pub struct Nanosecond;Expand description
A unit of time representing exactly one nanosecond.
Implementations§
Source§impl Nanosecond
 
impl Nanosecond
Sourcepub const fn per<T>(_larger: T) -> <Nanosecond as Per<T>>::Outputwhere
    Nanosecond: Per<T>,
    T: Copy,
 
pub const fn per<T>(_larger: T) -> <Nanosecond as Per<T>>::Outputwhere
    Nanosecond: Per<T>,
    T: Copy,
Obtain the number of times Nanosecond can fit into T.
If T is smaller than Nanosecond, the code will fail to
compile. The return type is the smallest unsigned integer type that can represent
the value.
Valid calls:
- Nanosecond::per(Nanosecond)(returns- u8)
- Nanosecond::per(Microsecond)(returns- u16)
- Nanosecond::per(Millisecond)(returns- u32)
- Nanosecond::per(Second)(returns- u32)
- Nanosecond::per(Minute)(returns- u64)
- Nanosecond::per(Hour)(returns- u64)
- Nanosecond::per(Day)(returns- u64)
- Nanosecond::per(Week)(returns- u64)
Trait Implementations§
Source§impl Clone for Nanosecond
 
impl Clone for Nanosecond
Source§fn clone(&self) -> Nanosecond
 
fn clone(&self) -> Nanosecond
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moreSource§impl Debug for Nanosecond
 
impl Debug for Nanosecond
impl Copy for Nanosecond
Auto Trait Implementations§
impl Freeze for Nanosecond
impl RefUnwindSafe for Nanosecond
impl Send for Nanosecond
impl Sync for Nanosecond
impl Unpin for Nanosecond
impl UnwindSafe for Nanosecond
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