Struct Microsecond
struct Microsecond
A unit of time representing exactly one microsecond.
Implementations
impl Microsecond
const fn per<T>(_larger: T) -> <T as DefaultOutput<Self>>::Output where T: MultipleOf<Self, <T as >::Output> + DefaultOutput<Self> + CopyObtain the number of times
Microsecondcan fit intoT. IfTis smaller thanMicrosecond, 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)
const fn per_t<Output, impl MultipleOf<Self, Output> + Copy: MultipleOf<Self, Output> + Copy>(larger: impl MultipleOf<Self, Output> + Copy) -> OutputObtain the number of times
Microsecondcan fit intoT. IfTis smaller thanMicrosecond, the code will fail to compile. The return type is any primitive numeric type that can represent the value.Valid calls:
Microsecond::per(Microsecond)(returnsu8,u16,u32,u64,u128,usize,i8,i16,i32,i64,i128,isize,f32, orf64)Microsecond::per(Millisecond)(returnsu16,u32,u64,u128,usize,i16,i32,i64,i128,isize,f32, orf64)Microsecond::per(Second)(returnsu32,u64,u128,usize,i32,i64,i128,isize,f32, orf64)Microsecond::per(Minute)(returnsu32,u64,u128,usize,i32,i64,i128,isize,f32, orf64)Microsecond::per(Hour)(returnsu32,u64,u128,i64,i128,f32, orf64)Microsecond::per(Day)(returnsu64,u128,i64,i128,f32, orf64)Microsecond::per(Week)(returnsu64,u128,i64,i128,f32, orf64)
impl Clone for Microsecond
fn clone(self: &Self) -> Microsecond
impl Copy for Microsecond
impl Debug for Microsecond
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Freeze for Microsecond
impl RefUnwindSafe for Microsecond
impl Send for Microsecond
impl Sync for Microsecond
impl Unpin for Microsecond
impl UnsafeUnpin for Microsecond
impl UnwindSafe for Microsecond
impl<T> Any for Microsecond
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for Microsecond
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for Microsecond
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for Microsecond
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for Microsecond
fn from(t: T) -> TReturns the argument unchanged.
impl<T, U> Into for Microsecond
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for Microsecond
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for Microsecond
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>