pub struct Microsecond;
Expand description
A unit of time representing exactly one microsecond.
Implementations§
Source§impl Microsecond
impl Microsecond
Sourcepub const fn per<T>(_larger: T) -> <Microsecond as Per<T>>::Outputwhere
Microsecond: Per<T>,
T: Copy,
pub const fn per<T>(_larger: T) -> <Microsecond as Per<T>>::Outputwhere
Microsecond: Per<T>,
T: Copy,
Obtain the number of times Microsecond
can fit into T
.
If T
is smaller than Microsecond
, the code will fail to
compile. The return type is the smallest unsigned integer type that can represent
the value.
Valid calls:
Microsecond::per(Microsecond)
(returnsu8
)Microsecond::per(Millisecond)
(returnsu16
)Microsecond::per(Second)
(returnsu32
)Microsecond::per(Minute)
(returnsu32
)Microsecond::per(Hour)
(returnsu32
)Microsecond::per(Day)
(returnsu64
)Microsecond::per(Week)
(returnsu64
)
Trait Implementations§
Source§impl Clone for Microsecond
impl Clone for Microsecond
Source§fn clone(&self) -> Microsecond
fn clone(&self) -> Microsecond
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 Microsecond
impl Debug for Microsecond
impl Copy for Microsecond
Auto Trait Implementations§
impl Freeze for Microsecond
impl RefUnwindSafe for Microsecond
impl Send for Microsecond
impl Sync for Microsecond
impl Unpin for Microsecond
impl UnwindSafe for Microsecond
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§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
)