Trait graphannis_malloc_size_of::MallocConditionalSizeOf [−][src]
pub trait MallocConditionalSizeOf { fn conditional_size_of(&self, ops: &mut MallocSizeOfOps) -> usize; }
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
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.