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

Like MallocSizeOf, but only measures if the value hasn’t already been measured. For use with types like Rc and Arc when appropriate (e.g. when there is no “primary” reference).

Required Methods§

source

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

Measure the heap usage of all heap-allocated descendant structures, but not the space taken up by the value itself, and only if that heap usage hasn’t already been measured.

Implementations on Foreign Types§

source§

impl<T: MallocSizeOf> MallocConditionalSizeOf for Arc<T>

Implementors§