pub trait MallocShallowSizeOf {
    // Required method
    fn shallow_size_of(&self, ops: &mut MallocSizeOfOps) -> usize;
}
Expand description

Trait for measuring the “shallow” heap usage of a container.

Required Methods§

source

fn shallow_size_of(&self, ops: &mut MallocSizeOfOps) -> usize

Measure the heap usage of immediate heap-allocated descendant structures, but not the space taken up by the value itself. Anything beyond the immediate descendants must be measured separately, using iteration.

Implementations on Foreign Types§

source§

impl<T: ?Sized> MallocShallowSizeOf for Box<T>

source§

impl<T> MallocShallowSizeOf for ThinVec<T>

source§

impl<T> MallocShallowSizeOf for Vec<T>

source§

impl<T, S> MallocShallowSizeOf for HashSet<T, S>where T: Eq + Hash, S: BuildHasher,

source§

impl<K, V> MallocShallowSizeOf for BTreeMap<K, V>where K: Eq + Hash,

source§

impl<K, V, S> MallocShallowSizeOf for HashMap<K, V, S>where K: Eq + Hash, S: BuildHasher,

source§

impl<T> MallocShallowSizeOf for VecDeque<T>

source§

impl<A: Array> MallocShallowSizeOf for SmallVec<A>

source§

impl MallocShallowSizeOf for ByteBuf

source§

impl<T, S> MallocShallowSizeOf for IndexSet<T, S>where T: Eq + Hash, S: BuildHasher,

source§

impl<K, V, S> MallocShallowSizeOf for IndexMap<K, V, S>where K: Eq + Hash, S: BuildHasher,

Implementors§