pub struct Datetime {
pub year: i32,
pub month: Option<u8>,
pub day: Option<u8>,
pub time: Option<Time>,
}
Expand description
Timezone-unaware date and time.
Must specify a year and may specify month, day, and time.
Fields§
§year: i32
The year.
AD years are counted starting from one and thus represented as exactly
their year (e.g., 2000 AD is 2000
) whereas BC years are counted
starting from zero downwards (e.g., 1000 BC is 999
)
month: Option<u8>
The month (starting at zero).
day: Option<u8>
The day (starting at zero).
time: Option<Time>
The timezone-unaware time.
Trait Implementations§
source§impl PartialEq for Datetime
impl PartialEq for Datetime
source§impl PartialOrd for Datetime
impl PartialOrd for Datetime
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Datetime
impl Eq for Datetime
impl StructuralPartialEq for Datetime
Auto Trait Implementations§
impl RefUnwindSafe for Datetime
impl Send for Datetime
impl Sync for Datetime
impl Unpin for Datetime
impl UnwindSafe for Datetime
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