pub struct YearFlags(pub(super) u8);
Expand description
Year flags (aka the dominical letter).
YearFlags
are used as the last four bits of NaiveDate
, Mdf
and IsoWeek
.
There are 14 possible classes of year in the Gregorian calendar: common and leap years starting with Monday through Sunday.
The YearFlags
stores this information into 4 bits LWWW
. L
is the leap year flag, with 1
for the common year (this simplifies validating an ordinal in NaiveDate
). WWW
is a non-zero
Weekday
of the last day in the preceding year.
Tuple Fields§
§0: u8
Implementations§
Trait Implementations§
impl Copy for YearFlags
impl Eq for YearFlags
impl StructuralPartialEq for YearFlags
Auto Trait Implementations§
impl Freeze for YearFlags
impl RefUnwindSafe for YearFlags
impl Send for YearFlags
impl Sync for YearFlags
impl Unpin for YearFlags
impl UnwindSafe for YearFlags
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
)