Struct time::convert::Nanosecond
source · 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)
(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
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<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
)