[−][src]Trait memory_db::MemTracker
Used to implement incremental evaluation of MallocSizeOf
for a collection.
Provided methods
fn on_remove(&mut self, _value: &T)
Update malloc_size_of
when a value is removed.
fn on_insert(&mut self, _value: &T)
Update malloc_size_of
when a value is inserted.
fn on_clear(&mut self)
Reset malloc_size_of
to zero.
fn get_size(&self) -> usize
Get the allocated size of the values.