pub struct Nanos(/* private fields */);
Expand description
A number of nanoseconds from a reference point.
Nanos can not represent durations >584 years, but hopefully that should not be a problem in real-world applications.
Implementations§
Trait Implementations§
source§impl Add<Nanos> for QuantaInstant
impl Add<Nanos> for QuantaInstant
§type Output = QuantaInstant
type Output = QuantaInstant
The resulting type after applying the
+
operator.source§impl Add<Nanos> for SystemTime
impl Add<Nanos> for SystemTime
§type Output = SystemTime
type Output = SystemTime
The resulting type after applying the
+
operator.source§impl Ord for Nanos
impl Ord for Nanos
source§impl PartialEq for Nanos
impl PartialEq for Nanos
source§impl PartialOrd for Nanos
impl PartialOrd for Nanos
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Reference for Nanos
impl Reference for Nanos
source§fn duration_since(&self, earlier: Self) -> Nanos
fn duration_since(&self, earlier: Self) -> Nanos
Determines the time that separates two measurements of a
clock. Implementations of this must perform a saturating
subtraction - if the
earlier
timestamp should be later,
duration_since
must return the zero duration.source§fn saturating_sub(&self, duration: Nanos) -> Self
fn saturating_sub(&self, duration: Nanos) -> Self
Returns a reference point that lies at most
duration
in the
past from the current reference. If an underflow should occur,
returns the current reference.source§impl SampleUniform for Nanos
impl SampleUniform for Nanos
impl Copy for Nanos
impl Eq for Nanos
impl StructuralPartialEq for Nanos
Auto Trait Implementations§
impl Freeze for Nanos
impl RefUnwindSafe for Nanos
impl Send for Nanos
impl Sync for Nanos
impl Unpin for Nanos
impl UnwindSafe for Nanos
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: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Borrowed> SampleBorrow<Borrowed> for Borrowedwhere
Borrowed: SampleUniform,
impl<Borrowed> SampleBorrow<Borrowed> for Borrowedwhere
Borrowed: SampleUniform,
source§fn borrow(&self) -> &Borrowed
fn borrow(&self) -> &Borrowed
Immutably borrows from an owned value. See
Borrow::borrow