pub struct Date {
pub year: u16,
pub month: u8,
pub day: u8,
}Expand description
A calendar date, for expires:.
Deliberately not a general date type: it exists to be parsed from YYYY-MM-DD, compared,
and printed. Comparison is on the tuple, which is why the fields are in that order.
Fields§
§year: u16Four-digit year.
month: u8One-based month.
day: u8One-based day.
Implementations§
Trait Implementations§
impl Copy for Date
impl Eq for Date
Source§impl Ord for Date
impl Ord for Date
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Date
impl PartialOrd for Date
impl StructuralPartialEq for Date
Auto Trait Implementations§
impl Freeze for Date
impl RefUnwindSafe for Date
impl Send for Date
impl Sync for Date
impl Unpin for Date
impl UnsafeUnpin for Date
impl UnwindSafe for Date
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