pub trait MemTracker<T> {
    fn on_remove(&mut self, _value: &T) { ... }
fn on_insert(&mut self, _value: &T) { ... }
fn on_clear(&mut self) { ... }
fn get_size(&self) -> usize { ... } }
Expand description

Used to implement incremental evaluation of MallocSizeOf for a collection.

Provided methods

Update malloc_size_of when a value is removed.

Update malloc_size_of when a value is inserted.

Reset malloc_size_of to zero.

Get the allocated size of the values.

Implementors