pub struct MonthCode(pub TinyAsciiStr<4_usize>);
Expand description
Representation of a month in a year
Month codes typically look like M01
, M02
, etc, but can handle leap months
(M03L
) in lunar calendars. Solar calendars will have codes between M01
and M12
potentially with an M13
for epagomenal months. Check the docs for a particular calendar
for details on what its month codes are.
Tuple Fields
0: TinyAsciiStr<4_usize>
Trait Implementations
sourceimpl AsULE for MonthCode
impl AsULE for MonthCode
type ULE = TinyAsciiStr<4_usize>
type ULE = TinyAsciiStr<4_usize>
The ULE type corresponding to Self
. Read more
sourcefn to_unaligned(self) -> TinyAsciiStr<4_usize>
fn to_unaligned(self) -> TinyAsciiStr<4_usize>
Converts from Self
to Self::ULE
. Read more
sourcefn from_unaligned(u: TinyAsciiStr<4_usize>) -> MonthCode
fn from_unaligned(u: TinyAsciiStr<4_usize>) -> MonthCode
Converts from Self::ULE
to Self
. Read more
sourceimpl Bake for MonthCode
impl Bake for MonthCode
sourcefn bake(&self, env: &CrateEnv) -> TokenStream
fn bake(&self, env: &CrateEnv) -> TokenStream
Returns a TokenStream
that would evaluate to self
. Read more
sourceimpl<'de> Deserialize<'de> for MonthCode
impl<'de> Deserialize<'de> for MonthCode
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<MonthCode, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<MonthCode, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl From<TinyAsciiStr<4_usize>> for MonthCode
impl From<TinyAsciiStr<4_usize>> for MonthCode
sourcefn from(x: TinyAsciiStr<4_usize>) -> MonthCode
fn from(x: TinyAsciiStr<4_usize>) -> MonthCode
Converts to this type from the input type.
sourceimpl Ord for MonthCode
impl Ord for MonthCode
sourceimpl PartialOrd<MonthCode> for MonthCode
impl PartialOrd<MonthCode> for MonthCode
sourcefn partial_cmp(&self, other: &MonthCode) -> Option<Ordering>
fn partial_cmp(&self, other: &MonthCode) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl Serialize for MonthCode
impl Serialize for MonthCode
sourcefn 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,
Serialize this value into the given Serde serializer. Read more
sourceimpl<'a> ZeroMapKV<'a> for MonthCode
impl<'a> ZeroMapKV<'a> for MonthCode
impl Copy for MonthCode
impl Eq for MonthCode
impl StructuralEq for MonthCode
impl StructuralPartialEq for MonthCode
Auto Trait Implementations
impl RefUnwindSafe for MonthCode
impl Send for MonthCode
impl Sync for MonthCode
impl Unpin for MonthCode
impl UnwindSafe for MonthCode
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Separable for T where
T: Display,
impl<T> Separable for T where
T: Display,
sourcefn separate_by_policy(&self, policy: SeparatorPolicy<'_>) -> String
fn separate_by_policy(&self, policy: SeparatorPolicy<'_>) -> String
Adds separators according to the given SeparatorPolicy
. Read more
sourcefn separate_with_commas(&self) -> String
fn separate_with_commas(&self) -> String
Inserts a comma every three digits from the right. Read more
sourcefn separate_with_spaces(&self) -> String
fn separate_with_spaces(&self) -> String
Inserts a space every three digits from the right. Read more
sourcefn separate_with_dots(&self) -> String
fn separate_with_dots(&self) -> String
Inserts a period every three digits from the right. Read more
sourcefn separate_with_underscores(&self) -> String
fn separate_with_underscores(&self) -> String
Inserts an underscore every three digits from the right. Read more
sourceimpl<T> Serialize for T where
T: Serialize + ?Sized,
impl<T> Serialize for T where
T: Serialize + ?Sized,
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more