pub struct Mono(/* private fields */);Expand description
An instant on the reader’s monotonic clock (§0): the time since an origin of the reader’s choosing, which never steps backwards.
Implementations§
Source§impl Mono
impl Mono
Sourcepub const fn from_nanos(ns: u64) -> Self
pub const fn from_nanos(ns: u64) -> Self
The instant ns nanoseconds after the origin.
Sourcepub const fn since_origin(self) -> Duration
pub const fn since_origin(self) -> Duration
The time since the origin.
Sourcepub fn saturating_add(self, d: Duration) -> Self
pub fn saturating_add(self, d: Duration) -> Self
This instant plus d, saturating.
Sourcepub fn saturating_since(self, earlier: Self) -> Duration
pub fn saturating_since(self, earlier: Self) -> Duration
The time from earlier to this instant, zero when earlier is
later.
Trait Implementations§
impl Copy for Mono
impl Eq for Mono
Source§impl Ord for Mono
impl Ord for Mono
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Mono
impl PartialOrd for Mono
impl StructuralPartialEq for Mono
Auto Trait Implementations§
impl Forget for Mono
impl Freeze for Mono
impl Move for Mono
impl RefUnwindSafe for Mono
impl Send for Mono
impl Sync for Mono
impl Unpin for Mono
impl UnsafeUnpin for Mono
impl UnwindSafe for Mono
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more