pub struct DebugIt<T> { /* private fields */ }Expand description
This type always implements Debug. Uses specialization to use
the inner value’s Debug (which it should basically always have).
Otherwise, falls back to print the type name.
§Examples
use debugit::DebugIt as D;
fn process_something<T>(x: T) {
unsafe {
println!("starting with {:?}", D(&x));
}
}Trait Implementations§
impl<T: Copy> Copy for DebugIt<T>
Auto Trait Implementations§
impl<T> Freeze for DebugIt<T>where
T: Freeze,
impl<T> RefUnwindSafe for DebugIt<T>where
T: RefUnwindSafe,
impl<T> Send for DebugIt<T>where
T: Send,
impl<T> Sync for DebugIt<T>where
T: Sync,
impl<T> Unpin for DebugIt<T>where
T: Unpin,
impl<T> UnwindSafe for DebugIt<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