pub struct IanaToBcp47Map<'data> {
pub map: ZeroAsciiIgnoreCaseTrie<ZeroVec<'data, u8>>,
pub bcp47_ids: ZeroVec<'data, TimeZone>,
}Expand description
A mapping from normal-case IANA time zone identifiers to BCP-47 time zone identifiers.
Multiple IANA time zone IDs can map to the same BCP-47 time zone ID.
๐ง This code is considered unstable; it may change at any time, in breaking or non-breaking ways,
including in SemVer minor releases. While the serde representation of data structs is guaranteed
to be stable, their Rust representation might not be. Use with caution.
Fieldsยง
ยงmap: ZeroAsciiIgnoreCaseTrie<ZeroVec<'data, u8>>A map from normal-case IANA time zone identifiers to indexes of BCP-47 time zone identifiers along with a canonical flag. The IANA identifiers are normal-case.
The usize values stored in the trie have the following form:
- Lowest bit: 1 if canonical, 0 if not canonical
- All remaining bits: index into
bcp47_ids
For example, in CLDR 44, "Africa/Abidjan" has value 221, which means it is canonical
(low bit is 1 == odd number) and the index into bcp47_ids is 110 (221 >> 1).
bcp47_ids: ZeroVec<'data, TimeZone>A list of BCP-47 time zone identifiers, sorted by canonical IANA ID.
Trait Implementationsยง
Sourceยงimpl<'data> Clone for IanaToBcp47Map<'data>
impl<'data> Clone for IanaToBcp47Map<'data>
Sourceยงfn clone(&self) -> IanaToBcp47Map<'data>
fn clone(&self) -> IanaToBcp47Map<'data>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) ยท Sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSourceยงimpl<'data> Debug for IanaToBcp47Map<'data>
impl<'data> Debug for IanaToBcp47Map<'data>
Sourceยงimpl MaybeAsVarULE for IanaToBcp47Map<'_>
impl MaybeAsVarULE for IanaToBcp47Map<'_>
Sourceยงimpl<'data> PartialEq for IanaToBcp47Map<'data>
impl<'data> PartialEq for IanaToBcp47Map<'data>
Sourceยงfn eq(&self, other: &IanaToBcp47Map<'data>) -> bool
fn eq(&self, other: &IanaToBcp47Map<'data>) -> bool
Tests for
self and other values to be equal, and is used by ==.Sourceยงimpl<'yoke> Yokeable<'yoke> for IanaToBcp47Map<'static>
impl<'yoke> Yokeable<'yoke> for IanaToBcp47Map<'static>
Sourceยงtype Output = IanaToBcp47Map<'yoke>
type Output = IanaToBcp47Map<'yoke>
This type MUST be
Self with the 'static replaced with 'a, i.e. Self<'a>Sourceยงfn transform_owned(self) -> Self::Output
fn transform_owned(self) -> Self::Output
Sourceยงimpl<'zf, 'zf_inner> ZeroFrom<'zf, IanaToBcp47Map<'zf_inner>> for IanaToBcp47Map<'zf>
impl<'zf, 'zf_inner> ZeroFrom<'zf, IanaToBcp47Map<'zf_inner>> for IanaToBcp47Map<'zf>
Sourceยงfn zero_from(this: &'zf IanaToBcp47Map<'zf_inner>) -> Self
fn zero_from(this: &'zf IanaToBcp47Map<'zf_inner>) -> Self
Clone the other
C into a struct that may retain references into C.impl<'data> StructuralPartialEq for IanaToBcp47Map<'data>
Auto Trait Implementationsยง
impl<'data> Freeze for IanaToBcp47Map<'data>
impl<'data> RefUnwindSafe for IanaToBcp47Map<'data>
impl<'data> Send for IanaToBcp47Map<'data>
impl<'data> Sync for IanaToBcp47Map<'data>
impl<'data> Unpin for IanaToBcp47Map<'data>
impl<'data> UnsafeUnpin for IanaToBcp47Map<'data>
impl<'data> UnwindSafe for IanaToBcp47Map<'data>
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