NativeTime

Trait NativeTime 

Source
pub trait NativeTime:
    Debug
    + PartialOrd
    + Copy
    + Add<Duration, Output = Self>
    + ToOwned {
    // Required methods
    fn minimum() -> Self;
    fn abs_diff(&self, other: &Self) -> Duration;
    fn now() -> Self;
}

Required Methods§

Source

fn minimum() -> Self

Source

fn abs_diff(&self, other: &Self) -> Duration

Source

fn now() -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl NativeTime for SystemTime

Available on crate feature std only.
Source§

fn minimum() -> Self

Source§

fn abs_diff(&self, earlier: &Self) -> Duration

Source§

fn now() -> Self

Implementors§