Trait loupe::MemoryUsage[][src]

pub trait MemoryUsage {
    fn size_of_val(&self, tracker: &mut dyn MemoryUsageTracker) -> usize;
}
Expand description

Traverse a value and collect its memory usage.

Required methods

Returns the size of the referenced value in bytes.

Recursively visits the value and any children returning the sum of their sizes. The size always includes any tail padding if applicable.

Implementations on Foreign Types

Implementors