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 item has a stack size of 32 bytes on the stable toolchain at release date.
๐ง 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.
Variantsยง
FixedEras(VarZeroVec<'data, str>)
This calendar has a small, fixed set of eras.
See era_index for how this is keyed.
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.
Cyclic(VarZeroVec<'data, str>)
This calendar is cyclic (Chinese, Dangi), so it uses cyclic year names without any eras
Trait Implementationsยง
Sourceยงimpl<'data> BakeSize for YearNames<'data>
impl<'data> BakeSize for YearNames<'data>
Sourceยงfn borrows_size(&self) -> usize
fn borrows_size(&self) -> usize
Returns the size
Sourceยงimpl<'de: 'data, 'data> Deserialize<'de> for YearNames<'data>
impl<'de: 'data, 'data> Deserialize<'de> for YearNames<'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>,
Deserialize this value from the given Serde deserializer. Read more
Sourceยงimpl MaybeAsVarULE for YearNames<'_>
impl MaybeAsVarULE for YearNames<'_>
Sourceยงimpl MaybeEncodeAsVarULE for YearNames<'_>
Available on crate feature datagen only.
impl MaybeEncodeAsVarULE for YearNames<'_>
Available on crate feature
datagen only.Sourceยงtype EncodeableStruct<'b> = &'b [()]
where
Self: 'b
type EncodeableStruct<'b> = &'b [()] where Self: 'b
The type returned by
Self::maybe_as_encodeable.Sourceยงfn maybe_as_encodeable<'b>(&'b self) -> Option<Self::EncodeableStruct<'b>>
fn maybe_as_encodeable<'b>(&'b self) -> Option<Self::EncodeableStruct<'b>>
Returns something encodeable to the
MaybeAsVarULE::EncodedStruct that represents
this data struct, or None if the data struct does not support this representation.impl<'data> StructuralPartialEq for YearNames<'data>
Sourceยงimpl<'yoke> Yokeable<'yoke> for YearNames<'static>
impl<'yoke> Yokeable<'yoke> for YearNames<'static>
Sourceยงtype Output = YearNames<'yoke>
type Output = YearNames<'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
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> UnsafeUnpin 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
Mutably borrows from an owned value. Read more
Sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
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> โ
Converts
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> โ
Converts
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