pub enum YearNames<'data> {
FixedEras(VarZeroVec<'data, str>),
VariableEras(VarZeroCow<'data, Tuple2VarULE<VarZeroSlice<PotentialUtf8>, VarZeroSlice<str>>>),
Cyclic(VarZeroVec<'data, str>),
}
Expand description
Names used for representing the year.
This uses a data marker attribute for length. The value is simply the number of
characters in the equivalent CLDR field syntax name, plus “s” for standalone contexts. For example,
“abbreviated” (e.g. MMM
) is 3
or 3s
depending on whether it is format or standalone
respectively.
The full list is:
- 3 is “abbreviated”
- 4 is “narrow”
- 5 is “wide”
- 6 is “short” (weekdays only)
📏 This item has a stack size of 32 bytes on the stable toolchain at release date.
Variants§
FixedEras(VarZeroVec<'data, str>)
This calendar has a small, fixed set of eras with numeric years, this stores the era names in chronological order.
See FormattableEra for a definition of what chronological order is in this context.
VariableEras(VarZeroCow<'data, Tuple2VarULE<VarZeroSlice<PotentialUtf8>, VarZeroSlice<str>>>)
This calendar has a variable set of eras with numeric years, this stores the era names mapped from era code to the name.
Only the Japanese calendars need this
Cyclic(VarZeroVec<'data, str>)
This calendar is cyclic (Chinese, Dangi), so it uses cyclic year names without any eras
Trait Implementations§
Source§impl<'de, 'data> Deserialize<'de> for YearNames<'data>where
'de: 'data,
impl<'de, 'data> Deserialize<'de> for YearNames<'data>where
'de: 'data,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<YearNames<'data>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<YearNames<'data>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl MaybeAsVarULE for YearNames<'_>
impl MaybeAsVarULE for YearNames<'_>
Source§impl<'a> Yokeable<'a> for YearNames<'static>
impl<'a> Yokeable<'a> for YearNames<'static>
Source§type Output = YearNames<'a>
type Output = YearNames<'a>
Self
with the 'static
replaced with 'a
, i.e. Self<'a>
impl<'data> StructuralPartialEq for YearNames<'data>
Auto Trait Implementations§
impl<'data> Freeze for YearNames<'data>
impl<'data> RefUnwindSafe for YearNames<'data>
impl<'data> Send for YearNames<'data>
impl<'data> Sync for YearNames<'data>
impl<'data> Unpin for YearNames<'data>
impl<'data> UnwindSafe for YearNames<'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