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