pub struct DisplayAsDebugWrapper<T>(pub T);
Expand description
Wraps a type that implements Display
and provides a Debug
implementation that calls Display::fmt
.
Tuple Fields§
§0: T
Trait Implementations§
Source§impl<T: Display> AstToStr for DisplayAsDebugWrapper<T>
impl<T: Display> AstToStr for DisplayAsDebugWrapper<T>
Source§fn ast_to_str_impl(&self, _: &dyn Symbols) -> String
fn ast_to_str_impl(&self, _: &dyn Symbols) -> String
This method should serialize the struct or enum recursively, returning a tree.
Source§fn ast_to_str(&self) -> String
fn ast_to_str(&self) -> String
This method is auto-implemented to call
ast_to_str_impl
with DefaultSymbols
.Source§impl<T: Clone> Clone for DisplayAsDebugWrapper<T>
impl<T: Clone> Clone for DisplayAsDebugWrapper<T>
Source§fn clone(&self) -> DisplayAsDebugWrapper<T>
fn clone(&self) -> DisplayAsDebugWrapper<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> Debug for DisplayAsDebugWrapper<T>where
T: Display,
impl<T> Debug for DisplayAsDebugWrapper<T>where
T: Display,
Source§impl<T> Deref for DisplayAsDebugWrapper<T>
impl<T> Deref for DisplayAsDebugWrapper<T>
Source§impl<T: PartialEq> PartialEq for DisplayAsDebugWrapper<T>
impl<T: PartialEq> PartialEq for DisplayAsDebugWrapper<T>
impl<T> StructuralPartialEq for DisplayAsDebugWrapper<T>
Auto Trait Implementations§
impl<T> Freeze for DisplayAsDebugWrapper<T>where
T: Freeze,
impl<T> RefUnwindSafe for DisplayAsDebugWrapper<T>where
T: RefUnwindSafe,
impl<T> Send for DisplayAsDebugWrapper<T>where
T: Send,
impl<T> Sync for DisplayAsDebugWrapper<T>where
T: Sync,
impl<T> Unpin for DisplayAsDebugWrapper<T>where
T: Unpin,
impl<T> UnwindSafe for DisplayAsDebugWrapper<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