pub trait MallocSizeOf {
    fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize;
}
Expand description

Trait for measuring the “deep” heap usage of a data structure. This is the most commonly-used of the traits.

Required Methods

Measure the heap usage of all descendant heap-allocated structures, but not the space taken up by the value itself.

Implementations on Foreign Types

If a mutex is stored directly as a member of a data type that is being measured, it is the unique owner of its contents and deserves to be measured.

If a mutex is stored inside of an Arc value as a member of a data type that is being measured, the Arc will not be automatically measured so there is no risk of overcounting the mutex’s contents.

Implementors