pub struct DebugStruct<'a, 'b: 'a> { /* private fields */ }
Expand description
A struct to help with fmt::Debug
implementations.
Constructed by the Formatter::debug_struct
method.
Implementations§
Source§impl<'a, 'b: 'a> DebugStruct<'a, 'b>
impl<'a, 'b: 'a> DebugStruct<'a, 'b>
Sourcepub fn new(fmt: &'a mut Formatter<'b>, name: &str) -> DebugStruct<'a, 'b>
pub fn new(fmt: &'a mut Formatter<'b>, name: &str) -> DebugStruct<'a, 'b>
Creates a new DebugStruct
.
Sourcepub fn field(self, name: &str, value: &dyn Debug) -> DebugStruct<'a, 'b>
pub fn field(self, name: &str, value: &dyn Debug) -> DebugStruct<'a, 'b>
Adds a new field to the generated struct output.
Auto Trait Implementations§
impl<'a, 'b> Freeze for DebugStruct<'a, 'b>
impl<'a, 'b> !RefUnwindSafe for DebugStruct<'a, 'b>
impl<'a, 'b> !Send for DebugStruct<'a, 'b>
impl<'a, 'b> !Sync for DebugStruct<'a, 'b>
impl<'a, 'b> Unpin for DebugStruct<'a, 'b>
impl<'a, 'b> !UnwindSafe for DebugStruct<'a, 'b>
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