#[repr(u8)]pub enum Year {
Calendar = 0,
Cyclic = 1,
RelatedIso = 2,
}
Expand description
An enum for the possible symbols of a year field in a date pattern.
Variants§
Calendar = 0
Field symbol for calendar year (numeric).
In most cases the length of this field specifies the minimum number of digits to display, zero-padded as necessary. For most use cases, Year::Calendar
or Year::WeekOf
should be adequate.
This field symbol is represented by the character y
in a date formatting pattern string.
For more details, see documentation on date field symbols.
Cyclic = 1
Field symbol for cyclic year; used in calendars where years are tracked in cycles, such as the Chinese or Dangi calendars.
This field symbol is represented by the character U
in a date formatting pattern string.
For more details, see documentation on date field symbols.
RelatedIso = 2
Field symbol for related ISO; some calendars which use different year numbering than ISO, or no year numbering, may express years in an ISO year corresponding to a calendar year.
This field symbol is represented by the character r
in a date formatting pattern string.
For more details, see documentation on date field symbols.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Year
impl<'de> Deserialize<'de> for Year
source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Year, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Year, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl From<Year> for FieldSymbol
impl From<Year> for FieldSymbol
source§fn from(input: Year) -> FieldSymbol
fn from(input: Year) -> FieldSymbol
source§impl Ord for Year
impl Ord for Year
source§impl PartialOrd for Year
impl PartialOrd for Year
source§impl Serialize for Year
impl Serialize for Year
source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
source§impl<'a> Yokeable<'a> for Year
impl<'a> Yokeable<'a> for Year
source§impl<'a> ZeroMapKV<'a> for Year
impl<'a> ZeroMapKV<'a> for Year
impl Copy for Year
impl Eq for Year
impl StructuralPartialEq for Year
Auto Trait Implementations§
impl Freeze for Year
impl RefUnwindSafe for Year
impl Send for Year
impl Sync for Year
impl Unpin for Year
impl UnwindSafe for Year
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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