pub struct DebugAsDisplay<T: Display>(pub T);Expand description
A wrapper that renders Debug using the inner type’s Display implementation.
This wrapper is needed for types that have an easy-to-understand Display impl but hard-to-understand Debug impl.
Tuple Fields§
§0: TInner value rendered with Display for both Debug and Display.
Trait Implementations§
Source§impl<T: Clone + Display> Clone for DebugAsDisplay<T>
impl<T: Clone + Display> Clone for DebugAsDisplay<T>
Source§fn clone(&self) -> DebugAsDisplay<T>
fn clone(&self) -> DebugAsDisplay<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: Display> Debug for DebugAsDisplay<T>
impl<T: Display> Debug for DebugAsDisplay<T>
Source§impl<T: Display> Display for DebugAsDisplay<T>
impl<T: Display> Display for DebugAsDisplay<T>
Source§impl<T: Display> From<T> for DebugAsDisplay<T>
impl<T: Display> From<T> for DebugAsDisplay<T>
Source§impl<T: Ord + Display> Ord for DebugAsDisplay<T>
impl<T: Ord + Display> Ord for DebugAsDisplay<T>
Source§fn cmp(&self, other: &DebugAsDisplay<T>) -> Ordering
fn cmp(&self, other: &DebugAsDisplay<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: PartialOrd + Display> PartialOrd for DebugAsDisplay<T>
impl<T: PartialOrd + Display> PartialOrd for DebugAsDisplay<T>
impl<T: Copy + Display> Copy for DebugAsDisplay<T>
impl<T: Eq + Display> Eq for DebugAsDisplay<T>
impl<T: Display> StructuralPartialEq for DebugAsDisplay<T>
Auto Trait Implementations§
impl<T> Freeze for DebugAsDisplay<T>where
T: Freeze,
impl<T> RefUnwindSafe for DebugAsDisplay<T>where
T: RefUnwindSafe,
impl<T> Send for DebugAsDisplay<T>where
T: Send,
impl<T> Sync for DebugAsDisplay<T>where
T: Sync,
impl<T> Unpin for DebugAsDisplay<T>where
T: Unpin,
impl<T> UnwindSafe for DebugAsDisplay<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