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) -> <Self as Per<T>>::Outputwhere
Self: Per<T>,
T: Copy,
pub const fn per<T>(_larger: T) -> <Self as Per<T>>::Outputwhere
Self: 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)
(returnsu8
)Nanosecond::per(Microsecond)
(returnsu16
)Nanosecond::per(Millisecond)
(returnsu32
)Nanosecond::per(Second)
(returnsu32
)Nanosecond::per(Minute)
(returnsu64
)Nanosecond::per(Hour)
(returnsu64
)Nanosecond::per(Day)
(returnsu64
)Nanosecond::per(Week)
(returnsu64
)
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