pub struct Date { /* private fields */ }Expand description
An ISO 8601 date.
Implementations§
Source§impl Date
impl Date
Sourcepub const fn new(
year: Year,
month: Month,
day: Day,
) -> Result<Self, ImpossibleDateError>
pub const fn new( year: Year, month: Month, day: Day, ) -> Result<Self, ImpossibleDateError>
Creates a new date, returning an error if the day is out of range for the given month and year.
Sourcepub const fn maximum_day(year: Year, month: Month) -> Day
pub const fn maximum_day(year: Year, month: Month) -> Day
Returns the maximum day of month in year, based on the table given in RFC 3339 §5.7.
Trait Implementations§
Source§impl Ord for Date
impl Ord for Date
Source§impl PartialOrd for Date
impl PartialOrd for Date
impl Copy for Date
impl Eq 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