Struct dbg_pls::DebugTupleStruct
source · [−]pub struct DebugTupleStruct<'a> { /* private fields */ }Expand description
A helper designed to assist with creation of
DebugPls implementations for tuple structs.
Examples
use dbg_pls::{pretty, DebugPls, Formatter};
struct Foo(i32, String);
impl DebugPls for Foo {
fn fmt(&self, f: Formatter) {
f.debug_tuple_struct("Foo")
.field(&self.0)
.field(&self.1)
.finish()
}
}
let value = Foo(10, "Hello".to_string());
assert_eq!(format!("{}", pretty(&value)), "Foo(10, \"Hello\")");Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for DebugTupleStruct<'a>
impl<'a> !Send for DebugTupleStruct<'a>
impl<'a> !Sync for DebugTupleStruct<'a>
impl<'a> Unpin for DebugTupleStruct<'a>
impl<'a> !UnwindSafe for DebugTupleStruct<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more