pub(crate) struct DateState {
day: Option<NonZero<u8>>,
month: Option<Month>,
iso_week: Option<NonZero<u8>>,
iso_year_is_initialized: bool,
iso_year: MaybeUninit<i32>,
}Expand description
State used by date-providing types to cache computed values.
This is used to avoid redundant computations when multiple date components are almost certainly going to be requested within the same formatting invocation.
Fields§
§day: Option<NonZero<u8>>§month: Option<Month>§iso_week: Option<NonZero<u8>>§iso_year_is_initialized: bool§iso_year: MaybeUninit<i32>Trait Implementations§
Auto Trait Implementations§
impl Freeze for DateState
impl RefUnwindSafe for DateState
impl Send for DateState
impl Sync for DateState
impl Unpin for DateState
impl UnsafeUnpin for DateState
impl UnwindSafe for DateState
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