pub struct Microseconds(pub u32);
Expand description
Represents a number of microseconds. Simple Newtype to attach meaning to the contained primitive. The std::duration::Duration which could also be used here is a much larger type in order to accomodate much bigger time spans, which may impact performance, code size and stack usage.
Tuple Fields§
§0: u32
Trait Implementations§
Source§impl Clone for Microseconds
impl Clone for Microseconds
Source§fn clone(&self) -> Microseconds
fn clone(&self) -> Microseconds
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 Microseconds
impl Debug for Microseconds
Source§impl Ord for Microseconds
impl Ord for Microseconds
Source§fn cmp(&self, other: &Microseconds) -> Ordering
fn cmp(&self, other: &Microseconds) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for Microseconds
impl PartialEq for Microseconds
Source§impl PartialOrd for Microseconds
impl PartialOrd for Microseconds
impl Copy for Microseconds
impl Eq for Microseconds
impl StructuralPartialEq for Microseconds
Auto Trait Implementations§
impl Freeze for Microseconds
impl RefUnwindSafe for Microseconds
impl Send for Microseconds
impl Sync for Microseconds
impl Unpin for Microseconds
impl UnwindSafe for Microseconds
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