pub struct NonZeroDuration(/* private fields */);
Expand description
A wrapper around Duration
that guarantees the duration is non-zero.
Implementations§
Trait Implementations§
Source§impl Clone for NonZeroDuration
impl Clone for NonZeroDuration
Source§fn clone(&self) -> NonZeroDuration
fn clone(&self) -> NonZeroDuration
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 Debug for NonZeroDuration
impl Debug for NonZeroDuration
Source§impl From<NonZeroDuration> for Duration
impl From<NonZeroDuration> for Duration
Source§fn from(nz_duration: NonZeroDuration) -> Self
fn from(nz_duration: NonZeroDuration) -> Self
Converts to this type from the input type.
Source§impl Hash for NonZeroDuration
impl Hash for NonZeroDuration
Source§impl Ord for NonZeroDuration
impl Ord for NonZeroDuration
Source§fn cmp(&self, other: &NonZeroDuration) -> Ordering
fn cmp(&self, other: &NonZeroDuration) -> 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 NonZeroDuration
impl PartialEq for NonZeroDuration
Source§impl PartialOrd for NonZeroDuration
impl PartialOrd for NonZeroDuration
impl Copy for NonZeroDuration
impl Eq for NonZeroDuration
impl StructuralPartialEq for NonZeroDuration
Auto Trait Implementations§
impl Freeze for NonZeroDuration
impl RefUnwindSafe for NonZeroDuration
impl Send for NonZeroDuration
impl Sync for NonZeroDuration
impl Unpin for NonZeroDuration
impl UnwindSafe for NonZeroDuration
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