pub struct Microseconds<T: TimeInt = u32>(pub T);
Expand description
A duration unit type
Tuple Fields§
§0: T
Implementations§
Trait Implementations§
Source§impl<T: TimeInt, Rhs> Add<Rhs> for Microseconds<T>
impl<T: TimeInt, Rhs> Add<Rhs> for Microseconds<T>
Source§impl<T: Clone + TimeInt> Clone for Microseconds<T>
impl<T: Clone + TimeInt> Clone for Microseconds<T>
Source§fn clone(&self) -> Microseconds<T>
fn clone(&self) -> Microseconds<T>
Returns a duplicate 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<T: Default + TimeInt> Default for Microseconds<T>
impl<T: Default + TimeInt> Default for Microseconds<T>
Source§fn default() -> Microseconds<T>
fn default() -> Microseconds<T>
Returns the “default value” for a type. Read more
Source§impl<T: TimeInt> Display for Microseconds<T>
impl<T: TimeInt> Display for Microseconds<T>
Source§impl<T: TimeInt> Div<T> for Microseconds<T>
impl<T: TimeInt> Div<T> for Microseconds<T>
Source§impl<T: TimeInt> Duration for Microseconds<T>
impl<T: TimeInt> Duration for Microseconds<T>
Source§fn to_generic<DestInt>(
self,
scaling_factor: Fraction,
) -> Result<Generic<DestInt>, ConversionError>
fn to_generic<DestInt>( self, scaling_factor: Fraction, ) -> Result<Generic<DestInt>, ConversionError>
Source§fn to_rate<Rate>(&self) -> Result<Rate, ConversionError>
fn to_rate<Rate>(&self) -> Result<Rate, ConversionError>
Source§impl<T: TimeInt> FixedPoint for Microseconds<T>
impl<T: TimeInt> FixedPoint for Microseconds<T>
Source§impl<T: TimeInt> From<Microseconds<T>> for Generic<T>
impl<T: TimeInt> From<Microseconds<T>> for Generic<T>
Source§fn from(duration: Microseconds<T>) -> Self
fn from(duration: Microseconds<T>) -> Self
Source§impl<T: TimeInt> From<Microseconds<T>> for Hours<T>
impl<T: TimeInt> From<Microseconds<T>> for Hours<T>
Source§fn from(small: Microseconds<T>) -> Self
fn from(small: Microseconds<T>) -> Self
Source§impl<T: TimeInt> From<Microseconds<T>> for Milliseconds<T>
impl<T: TimeInt> From<Microseconds<T>> for Milliseconds<T>
Source§fn from(small: Microseconds<T>) -> Self
fn from(small: Microseconds<T>) -> Self
Source§impl<T: TimeInt> From<Microseconds<T>> for Minutes<T>
impl<T: TimeInt> From<Microseconds<T>> for Minutes<T>
Source§fn from(small: Microseconds<T>) -> Self
fn from(small: Microseconds<T>) -> Self
Source§impl<T: TimeInt> From<Microseconds<T>> for Seconds<T>
impl<T: TimeInt> From<Microseconds<T>> for Seconds<T>
Source§fn from(small: Microseconds<T>) -> Self
fn from(small: Microseconds<T>) -> Self
Source§impl From<Microseconds> for Microseconds<u64>
impl From<Microseconds> for Microseconds<u64>
Source§fn from(source: Microseconds<u32>) -> Self
fn from(source: Microseconds<u32>) -> Self
Source§impl From<Microseconds> for Milliseconds<u64>
impl From<Microseconds> for Milliseconds<u64>
Source§fn from(small: Microseconds<u32>) -> Self
fn from(small: Microseconds<u32>) -> Self
Source§impl From<Microseconds> for Nanoseconds<u64>
impl From<Microseconds> for Nanoseconds<u64>
Source§fn from(big: Microseconds<u32>) -> Self
fn from(big: Microseconds<u32>) -> Self
Source§impl From<Milliseconds> for Microseconds<u64>
impl From<Milliseconds> for Microseconds<u64>
Source§fn from(big: Milliseconds<u32>) -> Self
fn from(big: Milliseconds<u32>) -> Self
Source§impl<T: TimeInt> From<Nanoseconds<T>> for Microseconds<T>
impl<T: TimeInt> From<Nanoseconds<T>> for Microseconds<T>
Source§fn from(small: Nanoseconds<T>) -> Self
fn from(small: Nanoseconds<T>) -> Self
Source§impl From<Nanoseconds> for Microseconds<u64>
impl From<Nanoseconds> for Microseconds<u64>
Source§fn from(small: Nanoseconds<u32>) -> Self
fn from(small: Nanoseconds<u32>) -> Self
Source§impl<T: TimeInt> Mul<T> for Microseconds<T>
impl<T: TimeInt> Mul<T> for Microseconds<T>
Source§impl<T: Ord + TimeInt> Ord for Microseconds<T>
impl<T: Ord + TimeInt> Ord for Microseconds<T>
Source§fn cmp(&self, other: &Microseconds<T>) -> Ordering
fn cmp(&self, other: &Microseconds<T>) -> 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<T: TimeInt, RhsInt: TimeInt> PartialEq<Microseconds<RhsInt>> for Hours<T>where
Microseconds<RhsInt>: TryFrom<Self>,
impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Microseconds<RhsInt>> for Hours<T>where
Microseconds<RhsInt>: TryFrom<Self>,
Source§impl<T, RhsInt: TimeInt> PartialEq<Microseconds<RhsInt>> for Microseconds<T>
impl<T, RhsInt: TimeInt> PartialEq<Microseconds<RhsInt>> for Microseconds<T>
Source§impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Microseconds<RhsInt>> for Milliseconds<T>where
Microseconds<RhsInt>: TryFrom<Self>,
impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Microseconds<RhsInt>> for Milliseconds<T>where
Microseconds<RhsInt>: TryFrom<Self>,
Source§impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Microseconds<RhsInt>> for Minutes<T>where
Microseconds<RhsInt>: TryFrom<Self>,
impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Microseconds<RhsInt>> for Minutes<T>where
Microseconds<RhsInt>: TryFrom<Self>,
Source§impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Microseconds<RhsInt>> for Nanoseconds<T>where
Self: TryFrom<Microseconds<RhsInt>>,
impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Microseconds<RhsInt>> for Nanoseconds<T>where
Self: TryFrom<Microseconds<RhsInt>>,
Source§impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Microseconds<RhsInt>> for Seconds<T>where
Microseconds<RhsInt>: TryFrom<Self>,
impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Microseconds<RhsInt>> for Seconds<T>where
Microseconds<RhsInt>: TryFrom<Self>,
Source§impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Milliseconds<RhsInt>> for Microseconds<T>where
Self: TryFrom<Milliseconds<RhsInt>>,
impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Milliseconds<RhsInt>> for Microseconds<T>where
Self: TryFrom<Milliseconds<RhsInt>>,
Source§impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Nanoseconds<RhsInt>> for Microseconds<T>where
Nanoseconds<RhsInt>: TryFrom<Self>,
impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Nanoseconds<RhsInt>> for Microseconds<T>where
Nanoseconds<RhsInt>: TryFrom<Self>,
Source§impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Hours<RhsInt>> for Microseconds<T>
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Hours<RhsInt>> for Microseconds<T>
Source§impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Microseconds<RhsInt>> for Hours<T>where
Microseconds<RhsInt>: TryFrom<Self>,
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Microseconds<RhsInt>> for Hours<T>where
Microseconds<RhsInt>: TryFrom<Self>,
Source§impl<T, RhsInt: TimeInt> PartialOrd<Microseconds<RhsInt>> for Microseconds<T>
impl<T, RhsInt: TimeInt> PartialOrd<Microseconds<RhsInt>> for Microseconds<T>
Source§impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Microseconds<RhsInt>> for Milliseconds<T>where
Microseconds<RhsInt>: TryFrom<Self>,
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Microseconds<RhsInt>> for Milliseconds<T>where
Microseconds<RhsInt>: TryFrom<Self>,
Source§impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Microseconds<RhsInt>> for Minutes<T>where
Microseconds<RhsInt>: TryFrom<Self>,
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Microseconds<RhsInt>> for Minutes<T>where
Microseconds<RhsInt>: TryFrom<Self>,
Source§impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Microseconds<RhsInt>> for Nanoseconds<T>where
Self: TryFrom<Microseconds<RhsInt>>,
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Microseconds<RhsInt>> for Nanoseconds<T>where
Self: TryFrom<Microseconds<RhsInt>>,
Source§impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Microseconds<RhsInt>> for Seconds<T>where
Microseconds<RhsInt>: TryFrom<Self>,
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Microseconds<RhsInt>> for Seconds<T>where
Microseconds<RhsInt>: TryFrom<Self>,
Source§impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Milliseconds<RhsInt>> for Microseconds<T>where
Self: TryFrom<Milliseconds<RhsInt>>,
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Milliseconds<RhsInt>> for Microseconds<T>where
Self: TryFrom<Milliseconds<RhsInt>>,
Source§impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Minutes<RhsInt>> for Microseconds<T>
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Minutes<RhsInt>> for Microseconds<T>
Source§impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Nanoseconds<RhsInt>> for Microseconds<T>where
Nanoseconds<RhsInt>: TryFrom<Self>,
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Nanoseconds<RhsInt>> for Microseconds<T>where
Nanoseconds<RhsInt>: TryFrom<Self>,
Source§impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Seconds<RhsInt>> for Microseconds<T>
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Seconds<RhsInt>> for Microseconds<T>
Source§impl<T: TimeInt, Rhs> Rem<Rhs> for Microseconds<T>
impl<T: TimeInt, Rhs> Rem<Rhs> for Microseconds<T>
Source§impl<T: TimeInt, Rhs> Sub<Rhs> for Microseconds<T>
impl<T: TimeInt, Rhs> Sub<Rhs> for Microseconds<T>
Source§impl<T> TryFrom<Duration> for Microseconds<T>
impl<T> TryFrom<Duration> for Microseconds<T>
Source§impl<T: TimeInt> TryFrom<Microseconds<T>> for Duration
impl<T: TimeInt> TryFrom<Microseconds<T>> for Duration
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§impl<T: TimeInt> TryFrom<Microseconds<T>> for Nanoseconds<T>
impl<T: TimeInt> TryFrom<Microseconds<T>> for Nanoseconds<T>
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<Microseconds<u64>> for Hours<u32>
impl TryFrom<Microseconds<u64>> for Hours<u32>
Source§impl TryFrom<Microseconds<u64>> for Microseconds<u32>
impl TryFrom<Microseconds<u64>> for Microseconds<u32>
Source§impl TryFrom<Microseconds<u64>> for Milliseconds<u32>
impl TryFrom<Microseconds<u64>> for Milliseconds<u32>
Source§impl TryFrom<Microseconds<u64>> for Minutes<u32>
impl TryFrom<Microseconds<u64>> for Minutes<u32>
Source§impl TryFrom<Microseconds<u64>> for Nanoseconds<u32>
impl TryFrom<Microseconds<u64>> for Nanoseconds<u32>
Source§impl TryFrom<Microseconds<u64>> for Seconds<u32>
impl TryFrom<Microseconds<u64>> for Seconds<u32>
Source§impl<T: TimeInt> TryFrom<Milliseconds<T>> for Microseconds<T>
impl<T: TimeInt> TryFrom<Milliseconds<T>> for Microseconds<T>
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<Milliseconds<u64>> for Microseconds<u32>
impl TryFrom<Milliseconds<u64>> for Microseconds<u32>
Source§impl TryFrom<Nanoseconds<u64>> for Microseconds<u32>
impl TryFrom<Nanoseconds<u64>> for Microseconds<u32>
impl<T: Copy + TimeInt> Copy for Microseconds<T>
impl<T: Eq + TimeInt> Eq for Microseconds<T>
Auto Trait Implementations§
impl<T> Freeze for Microseconds<T>where
T: Freeze,
impl<T> RefUnwindSafe for Microseconds<T>where
T: RefUnwindSafe,
impl<T> Send for Microseconds<T>where
T: Send,
impl<T> Sync for Microseconds<T>where
T: Sync,
impl<T> Unpin for Microseconds<T>where
T: Unpin,
impl<T> UnwindSafe for Microseconds<T>where
T: UnwindSafe,
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