#[non_exhaustive]pub struct Date {
pub year: u16,
pub month: u16,
pub day: u16,
}Expand description
A DOS compatible date.
Used by DirEntry time-related methods.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.year: u16Full year - [1980, 2107]
month: u16Month of the year - [1, 12]
day: u16Day of the month - [1, 31]
Implementations§
Source§impl Date
impl Date
Sourcepub fn new(year: u16, month: u16, day: u16) -> Self
pub fn new(year: u16, month: u16, day: u16) -> Self
Creates a new Date instance.
year- full year number in the range [1980, 2107]month- month of the year in the range [1, 12]day- a day of the month in the range [1, 31]
§Panics
Panics if one of provided arguments is out of the supported range.
Trait Implementations§
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 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