pub struct Duration {
pub secs: i64,
pub nanos: i32,
}Fields§
§secs: i64§nanos: i32Implementations§
Source§impl Duration
impl Duration
pub fn zero() -> Self
pub fn seconds(secs: i64) -> Self
pub fn minutes(mins: i64) -> Self
pub fn hours(hours: i64) -> Self
pub fn days(days: i64) -> Self
pub fn milliseconds(ms: i64) -> Self
pub fn microseconds(us: i64) -> Self
pub fn nanoseconds(ns: i64) -> Self
pub fn num_seconds(&self) -> i64
pub fn num_minutes(&self) -> i64
pub fn num_hours(&self) -> i64
pub fn num_days(&self) -> i64
pub fn num_milliseconds(&self) -> i64
Trait Implementations§
Source§impl Add<Duration> for NaiveDateTime
impl Add<Duration> for NaiveDateTime
impl Copy for Duration
impl Eq for Duration
Source§impl Ord for Duration
impl Ord for Duration
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 PartialOrd for Duration
impl PartialOrd for Duration
impl StructuralPartialEq for Duration
Auto Trait Implementations§
impl Freeze for Duration
impl RefUnwindSafe for Duration
impl Send for Duration
impl Sync for Duration
impl Unpin for Duration
impl UnsafeUnpin for Duration
impl UnwindSafe for Duration
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.