struct ApproxDuration(u64);Expand description
A duration in seconds.
This is the same as std::time::Duration except that we do not care about nanosecond precision.
Tuple Fields§
§0: u64Implementations§
Trait Implementations§
Source§impl Add for ApproxDuration
impl Add for ApproxDuration
Source§impl Clone for ApproxDuration
impl Clone for ApproxDuration
Source§fn clone(&self) -> ApproxDuration
fn clone(&self) -> ApproxDuration
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ApproxDuration
impl Debug for ApproxDuration
Source§impl Default for ApproxDuration
impl Default for ApproxDuration
Source§fn default() -> ApproxDuration
fn default() -> ApproxDuration
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ApproxDuration
impl<'de> Deserialize<'de> for ApproxDuration
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Div<u64> for ApproxDuration
impl Div<u64> for ApproxDuration
Source§impl From<Duration> for ApproxDuration
impl From<Duration> for ApproxDuration
Source§impl MallocSizeOf for ApproxDuration
impl MallocSizeOf for ApproxDuration
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Source§impl Ord for ApproxDuration
impl Ord for ApproxDuration
Source§fn cmp(&self, other: &ApproxDuration) -> Ordering
fn cmp(&self, other: &ApproxDuration) -> Ordering
1.21.0 (const: unstable) · 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 ApproxDuration
impl PartialEq for ApproxDuration
Source§fn eq(&self, other: &ApproxDuration) -> bool
fn eq(&self, other: &ApproxDuration) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ApproxDuration
impl PartialOrd for ApproxDuration
Source§impl Serialize for ApproxDuration
impl Serialize for ApproxDuration
Source§impl Sub for ApproxDuration
impl Sub for ApproxDuration
impl Copy for ApproxDuration
impl Eq for ApproxDuration
impl StructuralPartialEq for ApproxDuration
Auto Trait Implementations§
impl Freeze for ApproxDuration
impl RefUnwindSafe for ApproxDuration
impl Send for ApproxDuration
impl Sync for ApproxDuration
impl Unpin for ApproxDuration
impl UnsafeUnpin for ApproxDuration
impl UnwindSafe for ApproxDuration
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§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert