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
Source§type Output = QuantaInstant
type Output = QuantaInstant
The resulting type after applying the
+
operator.Source§impl Add<Nanos> for SystemTime
impl Add<Nanos> for SystemTime
Source§type Output = SystemTime
type Output = SystemTime
The resulting type after applying the
+
operator.Source§impl Ord for Nanos
impl Ord for Nanos
Source§impl PartialOrd for Nanos
impl PartialOrd for Nanos
Source§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: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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