pub struct IanaBcp47RoundTripMapperBorrowed<'a> {
data1: &'a IanaToBcp47MapV1<'a>,
data2: &'a Bcp47ToIanaMapV1<'a>,
}
👎Deprecated since 1.5.0: use
TimeZoneIdMapper
insteadExpand description
A borrowed wrapper around IANA-BCP47 time zone data, returned by
IanaBcp47RoundTripMapper::as_borrowed()
. More efficient to query.
Fields§
§data1: &'a IanaToBcp47MapV1<'a>
👎Deprecated since 1.5.0: use
§TimeZoneIdMapper
insteaddata2: &'a Bcp47ToIanaMapV1<'a>
👎Deprecated since 1.5.0: use
TimeZoneIdMapper
insteadImplementations§
source§impl<'a> IanaBcp47RoundTripMapperBorrowed<'a>
impl<'a> IanaBcp47RoundTripMapperBorrowed<'a>
sourcepub fn iana_to_bcp47(&self, iana_id: &str) -> Option<TimeZoneBcp47Id>
pub fn iana_to_bcp47(&self, iana_id: &str) -> Option<TimeZoneBcp47Id>
Looks up a BCP-47 time zone identifier based on an ASCII-case-insensitive match for the given IANA time zone identifier.
This is the type of match specified in ECMAScript Temporal.
See examples in IanaToBcp47Mapper
or IanaBcp47RoundTripMapper
.
sourcepub fn bcp47_to_iana(&self, bcp47_id: TimeZoneBcp47Id) -> Option<&str>
pub fn bcp47_to_iana(&self, bcp47_id: TimeZoneBcp47Id) -> Option<&str>
Looks up the canonical IANA time zone identifier of a BCP-47 time zone identifier.
See examples in IanaBcp47RoundTripMapper
.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for IanaBcp47RoundTripMapperBorrowed<'a>
impl<'a> RefUnwindSafe for IanaBcp47RoundTripMapperBorrowed<'a>
impl<'a> Send for IanaBcp47RoundTripMapperBorrowed<'a>
impl<'a> Sync for IanaBcp47RoundTripMapperBorrowed<'a>
impl<'a> Unpin for IanaBcp47RoundTripMapperBorrowed<'a>
impl<'a> UnwindSafe for IanaBcp47RoundTripMapperBorrowed<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more