Struct dur::ExactDisplay
source · pub struct ExactDisplay(/* private fields */);
Expand description
Implements Display without loss of precision.
The only purpose of ExactDisplay is to implement Display losslessly; meaning, printing a value of this type with
{}
and parsing it back into Duration will always yield the same value.
The only way to obtain a value of this struct is via the format_exact method on Duration.
Trait Implementations§
source§impl Clone for ExactDisplay
impl Clone for ExactDisplay
source§fn clone(&self) -> ExactDisplay
fn clone(&self) -> ExactDisplay
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 ExactDisplay
impl Debug for ExactDisplay
source§impl Display for ExactDisplay
impl Display for ExactDisplay
source§impl Hash for ExactDisplay
impl Hash for ExactDisplay
source§impl Ord for ExactDisplay
impl Ord for ExactDisplay
source§fn cmp(&self, other: &ExactDisplay) -> Ordering
fn cmp(&self, other: &ExactDisplay) -> 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 ExactDisplay
impl PartialEq for ExactDisplay
source§fn eq(&self, other: &ExactDisplay) -> bool
fn eq(&self, other: &ExactDisplay) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ExactDisplay
impl PartialOrd for ExactDisplay
source§fn partial_cmp(&self, other: &ExactDisplay) -> Option<Ordering>
fn partial_cmp(&self, other: &ExactDisplay) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for ExactDisplay
impl Eq for ExactDisplay
impl StructuralPartialEq for ExactDisplay
Auto Trait Implementations§
impl Freeze for ExactDisplay
impl RefUnwindSafe for ExactDisplay
impl Send for ExactDisplay
impl Sync for ExactDisplay
impl Unpin for ExactDisplay
impl UnwindSafe for ExactDisplay
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