pub struct NaiveDateTime {
pub date: NaiveDate,
pub time: NaiveTime,
}Fields§
§date: NaiveDate§time: NaiveTimeImplementations§
Source§impl NaiveDateTime
impl NaiveDateTime
pub fn new(date: NaiveDate, time: NaiveTime) -> Self
pub fn from_timestamp_opt(secs: i64, nsecs: u32) -> Option<Self>
pub fn timestamp(&self) -> i64
pub fn date(&self) -> NaiveDate
pub fn time(&self) -> NaiveTime
pub fn format<'a>(&'a self, fmt_str: &'a str) -> Format<'a>
pub fn signed_duration_since(&self, other: NaiveDateTime) -> Duration
Trait Implementations§
Source§impl Add<Duration> for NaiveDateTime
impl Add<Duration> for NaiveDateTime
Source§impl Clone for NaiveDateTime
impl Clone for NaiveDateTime
Source§fn clone(&self) -> NaiveDateTime
fn clone(&self) -> NaiveDateTime
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for NaiveDateTime
Source§impl Debug for NaiveDateTime
impl Debug for NaiveDateTime
Source§impl<'de> Deserialize<'de> for NaiveDateTime
impl<'de> Deserialize<'de> for NaiveDateTime
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for NaiveDateTime
impl Display for NaiveDateTime
impl Eq for NaiveDateTime
Source§impl Hash for NaiveDateTime
impl Hash 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 (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 PartialEq for NaiveDateTime
impl PartialEq for NaiveDateTime
Source§fn eq(&self, other: &NaiveDateTime) -> bool
fn eq(&self, other: &NaiveDateTime) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for NaiveDateTime
impl PartialOrd for NaiveDateTime
Source§impl Serialize for NaiveDateTime
impl Serialize for NaiveDateTime
impl StructuralPartialEq for NaiveDateTime
Source§impl Sub for NaiveDateTime
impl Sub 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 UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Colorize for Twhere
T: Display,
impl<T> Colorize for Twhere
T: Display,
fn red(&self) -> String
fn green(&self) -> String
fn yellow(&self) -> String
fn blue(&self) -> String
fn magenta(&self) -> String
fn cyan(&self) -> String
fn white(&self) -> String
fn bold(&self) -> String
fn dimmed(&self) -> String
fn italic(&self) -> String
fn on_black(&self) -> String
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.