pub struct MonthCode(pub TinyAsciiStr<4>);
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.
Month codes are shared with Temporal, see Temporal proposal.
Tuple Fields§
§0: TinyAsciiStr<4>
Implementations§
Trait Implementations§
source§impl AsULE for MonthCode
impl AsULE for MonthCode
source§type ULE = TinyAsciiStr<4>
type ULE = TinyAsciiStr<4>
The ULE type corresponding to
Self
. Read moresource§fn to_unaligned(self) -> TinyAsciiStr<4>
fn to_unaligned(self) -> TinyAsciiStr<4>
source§fn from_unaligned(u: TinyAsciiStr<4>) -> MonthCode
fn from_unaligned(u: TinyAsciiStr<4>) -> MonthCode
source§impl<'de> Deserialize<'de> for MonthCode
impl<'de> Deserialize<'de> for MonthCode
source§fn 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
source§impl Ord for MonthCode
impl Ord for MonthCode
source§impl PartialOrd for MonthCode
impl PartialOrd for MonthCode
source§impl Serialize for MonthCode
impl Serialize for MonthCode
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,
Serialize this value into the given Serde serializer. Read more
source§impl<'a> ZeroMapKV<'a> for MonthCode
impl<'a> ZeroMapKV<'a> for MonthCode
impl Copy for MonthCode
impl Eq for MonthCode
impl StructuralPartialEq for MonthCode
Auto Trait Implementations§
impl Freeze for MonthCode
impl RefUnwindSafe for MonthCode
impl Send for MonthCode
impl Sync for MonthCode
impl Unpin for MonthCode
impl UnwindSafe for MonthCode
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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
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>
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