pub struct CompactDecimalPatternData<'data> {
pub patterns: ZeroMap2d<'data, i8, Count, PatternULE>,
}
Expand description
Compact Decimal Pattern data struct.
As in CLDR, this is a mapping from type (a power of ten, corresponding to the magnitude of the number being formatted) and count (a plural case or an explicit 1) to a pattern.
However, plural cases that are identical to the other case are omitted, thus given
(1000, one) ↦ 0K, (1000, other) ↦ 0K
only
(1000, other) ↦ 0K
is stored.
Further, if all plural cases are compatible across consecutive types, the larger types are omitted, thus given
(1000, other) ↦ 0K, (10000, other) ↦ 00K, (100000, other) ↦ 000K
only
(1000, other) ↦ 0K
is stored.
Finally, the pattern indicating noncompact notation for the first few powers of ten is omitted; that is, there is an implicit (1, other) ↦ 0.
Fields§
§patterns: ZeroMap2d<'data, i8, Count, PatternULE>
A map keyed on log10 of the CLDR type
attribute and the CLDR count
attribute.
Trait Implementations§
Source§impl<'data> Bake for CompactDecimalPatternData<'data>
impl<'data> Bake for CompactDecimalPatternData<'data>
Source§fn bake(&self, env: &CrateEnv) -> TokenStream
fn bake(&self, env: &CrateEnv) -> TokenStream
Source§impl<'data> BakeSize for CompactDecimalPatternData<'data>
impl<'data> BakeSize for CompactDecimalPatternData<'data>
Source§fn borrows_size(&self) -> usize
fn borrows_size(&self) -> usize
Source§impl<'data> Clone for CompactDecimalPatternData<'data>
impl<'data> Clone for CompactDecimalPatternData<'data>
Source§fn clone(&self) -> CompactDecimalPatternData<'data>
fn clone(&self) -> CompactDecimalPatternData<'data>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<'data> Debug for CompactDecimalPatternData<'data>
impl<'data> Debug for CompactDecimalPatternData<'data>
Source§impl<'data> Default for CompactDecimalPatternData<'data>
impl<'data> Default for CompactDecimalPatternData<'data>
Source§fn default() -> CompactDecimalPatternData<'data>
fn default() -> CompactDecimalPatternData<'data>
Source§impl<'de: 'data, 'data> Deserialize<'de> for CompactDecimalPatternData<'data>
impl<'de: 'data, 'data> Deserialize<'de> for CompactDecimalPatternData<'data>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl MaybeAsVarULE for CompactDecimalPatternData<'_>
impl MaybeAsVarULE for CompactDecimalPatternData<'_>
Source§type EncodedStruct = [()]
type EncodedStruct = [()]
VarULE
] type for this data struct, or [()]
if it cannot be represented as [VarULE
].Source§impl MaybeEncodeAsVarULE for CompactDecimalPatternData<'_>
impl MaybeEncodeAsVarULE for CompactDecimalPatternData<'_>
Source§fn maybe_encode_as_varule(&self) -> Option<&Self::EncodedStruct>
fn maybe_encode_as_varule(&self) -> Option<&Self::EncodedStruct>
MaybeAsVarULE::EncodedStruct
] that represents this data struct,
or None
if the data struct does not support this representation.Source§impl<'data> PartialEq for CompactDecimalPatternData<'data>
impl<'data> PartialEq for CompactDecimalPatternData<'data>
Source§fn eq(&self, other: &CompactDecimalPatternData<'data>) -> bool
fn eq(&self, other: &CompactDecimalPatternData<'data>) -> bool
self
and other
values to be equal, and is used by ==
.Source§impl<'data> Serialize for CompactDecimalPatternData<'data>
impl<'data> Serialize for CompactDecimalPatternData<'data>
Source§impl<'a> Yokeable<'a> for CompactDecimalPatternData<'static>
impl<'a> Yokeable<'a> for CompactDecimalPatternData<'static>
Source§type Output = CompactDecimalPatternData<'a>
type Output = CompactDecimalPatternData<'a>
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§unsafe fn make(this: Self::Output) -> Self
unsafe fn make(this: Self::Output) -> Self
Self<'a>
’s lifetime. Read moreSource§fn transform_mut<F>(&'a mut self, f: F)where
F: 'static + for<'b> FnOnce(&'b mut Self::Output),
fn transform_mut<F>(&'a mut self, f: F)where
F: 'static + for<'b> FnOnce(&'b mut Self::Output),
self
between &'a mut Self<'static>
and &'a mut Self<'a>
,
and pass it to f
. Read moreSource§impl<'zf, 'zf_inner> ZeroFrom<'zf, CompactDecimalPatternData<'zf_inner>> for CompactDecimalPatternData<'zf>
impl<'zf, 'zf_inner> ZeroFrom<'zf, CompactDecimalPatternData<'zf_inner>> for CompactDecimalPatternData<'zf>
Source§fn zero_from(this: &'zf CompactDecimalPatternData<'zf_inner>) -> Self
fn zero_from(this: &'zf CompactDecimalPatternData<'zf_inner>) -> Self
C
into a struct that may retain references into C
.impl<'data> StructuralPartialEq for CompactDecimalPatternData<'data>
Auto Trait Implementations§
impl<'data> Freeze for CompactDecimalPatternData<'data>
impl<'data> RefUnwindSafe for CompactDecimalPatternData<'data>
impl<'data> Send for CompactDecimalPatternData<'data>
impl<'data> Sync for CompactDecimalPatternData<'data>
impl<'data> Unpin for CompactDecimalPatternData<'data>
impl<'data> UnwindSafe for CompactDecimalPatternData<'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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more