pub struct DebugTuple<'a> { /* private fields */ }Expand description
A helper designed to assist with creation of
DebugPls implementations for tuples.
§Examples
use dbg_pls::{pretty, DebugPls, Formatter};
struct Foo(i32, String);
impl DebugPls for Foo {
fn fmt(&self, f: Formatter) {
f.debug_tuple()
.field(&self.0)
.field(&self.1)
.finish()
}
}
let value = Foo(10, "Hello".to_string());
assert_eq!(format!("{}", pretty(&value)), "(10, \"Hello\")");Implementations§
Auto Trait Implementations§
impl<'a> Freeze for DebugTuple<'a>
impl<'a> RefUnwindSafe for DebugTuple<'a>
impl<'a> !Send for DebugTuple<'a>
impl<'a> !Sync for DebugTuple<'a>
impl<'a> Unpin for DebugTuple<'a>
impl<'a> !UnwindSafe for DebugTuple<'a>
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