pub trait MemDbg: MemDbgImpl {
// Provided methods
fn mem_dbg(&self, flags: DbgFlags) -> Result { ... }
fn mem_dbg_on(&self, writer: &mut impl Write, flags: DbgFlags) -> Result { ... }
fn mem_dbg_depth(&self, max_depth: usize, flags: DbgFlags) -> Result { ... }
fn mem_dbg_depth_on(
&self,
writer: &mut impl Write,
max_depth: usize,
flags: DbgFlags,
) -> Result { ... }
}
Expand description
Provided Methods§
Sourcefn mem_dbg(&self, flags: DbgFlags) -> Result
fn mem_dbg(&self, flags: DbgFlags) -> Result
Writes to stderr debug infos about the structure memory usage, expanding all levels of nested structures.
Sourcefn mem_dbg_on(&self, writer: &mut impl Write, flags: DbgFlags) -> Result
fn mem_dbg_on(&self, writer: &mut impl Write, flags: DbgFlags) -> Result
Writes to a core::fmt::Write
debug infos about the structure memory
usage, expanding all levels of nested structures.
Sourcefn mem_dbg_depth(&self, max_depth: usize, flags: DbgFlags) -> Result
fn mem_dbg_depth(&self, max_depth: usize, flags: DbgFlags) -> Result
Writes to stderr debug infos about the structure memory usage as
mem_dbg
, but expanding only up to max_depth
levels of nested structures.
Sourcefn mem_dbg_depth_on(
&self,
writer: &mut impl Write,
max_depth: usize,
flags: DbgFlags,
) -> Result
fn mem_dbg_depth_on( &self, writer: &mut impl Write, max_depth: usize, flags: DbgFlags, ) -> Result
Writes to a core::fmt::Write
debug infos about the structure memory
usage as mem_dbg_on
, but expanding only up to
max_depth
levels of nested structures.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
impl<T: MemDbgImpl> MemDbg for T
Implemens MemDbg
for all types that implement MemDbgImpl
.
This is done so that no one can change the implementation of MemDbg
,
which ensures consistency in printing.