Struct icu_timezone::IanaToBcp47MapperBorrowed
source ยท pub struct IanaToBcp47MapperBorrowed<'a> {
data: &'a IanaToBcp47MapV1<'a>,
}
๐Deprecated since 1.5.0: use
TimeZoneIdMapper
insteadExpand description
A borrowed wrapper around IANA-to-BCP47 time zone data, returned by
IanaToBcp47Mapper::as_borrowed()
. More efficient to query.
Fieldsยง
ยงdata: &'a IanaToBcp47MapV1<'a>
๐Deprecated since 1.5.0: use
TimeZoneIdMapper
insteadImplementationsยง
sourceยงimpl<'a> IanaToBcp47MapperBorrowed<'a>
impl<'a> IanaToBcp47MapperBorrowed<'a>
sourcepub fn get(&self, iana_id: &str) -> Option<TimeZoneBcp47Id>
pub fn get(&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
.
sourcepub fn get_bytes(&self, iana_id: &[u8]) -> Option<TimeZoneBcp47Id>
pub fn get_bytes(&self, iana_id: &[u8]) -> 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
.
Trait Implementationsยง
Auto Trait Implementationsยง
impl<'a> Freeze for IanaToBcp47MapperBorrowed<'a>
impl<'a> RefUnwindSafe for IanaToBcp47MapperBorrowed<'a>
impl<'a> Send for IanaToBcp47MapperBorrowed<'a>
impl<'a> Sync for IanaToBcp47MapperBorrowed<'a>
impl<'a> Unpin for IanaToBcp47MapperBorrowed<'a>
impl<'a> UnwindSafe for IanaToBcp47MapperBorrowed<'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