pub struct NaiveDateTime {
pub year: i32,
pub month: Month,
pub day: u8,
pub hour: u8,
pub minute: u8,
pub second: u8,
}
Expand description
A date and time without associated time zone information.
Fields§
§year: i32
Year number per ISO 8601.
For example, 2016 AC is +2016, 1 AC is +1, 1 BC is 0, 2 BC is -1, etc.
month: Month
§day: u8
1st of the month is day 1
hour: u8
§minute: u8
§second: u8
Implementations§
Source§impl NaiveDateTime
impl NaiveDateTime
Trait Implementations§
Source§impl Clone for NaiveDateTime
impl Clone for NaiveDateTime
Source§fn clone(&self) -> NaiveDateTime
fn clone(&self) -> NaiveDateTime
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for NaiveDateTime
impl Debug for NaiveDateTime
Source§impl Ord for NaiveDateTime
impl Ord for NaiveDateTime
Source§fn cmp(&self, other: &NaiveDateTime) -> Ordering
fn cmp(&self, other: &NaiveDateTime) -> Ordering
1.21.0 · 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 PartialEq for NaiveDateTime
impl PartialEq for NaiveDateTime
Source§impl PartialOrd for NaiveDateTime
impl PartialOrd for NaiveDateTime
impl Copy for NaiveDateTime
impl Eq for NaiveDateTime
impl StructuralPartialEq for NaiveDateTime
Auto Trait Implementations§
impl Freeze for NaiveDateTime
impl RefUnwindSafe for NaiveDateTime
impl Send for NaiveDateTime
impl Sync for NaiveDateTime
impl Unpin for NaiveDateTime
impl UnwindSafe for NaiveDateTime
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