Trait MemUtils

Source
pub trait MemUtils {
    // Required methods
    fn type_name(&self) -> &'static str;
    fn mem_size(&self) -> usize;
    fn view(&self);
}
Expand description

Reflection helpers: type name and memory size.

Required Methods§

Source

fn type_name(&self) -> &'static str

Returns the type name of self.

Source

fn mem_size(&self) -> usize

Returns memory size in bytes of the type.

Source

fn view(&self)

Prints type and memory size to stdout.

Implementors§

Source§

impl<T> MemUtils for T