Skip to main content

MallocUnconditionalSizeOf

Trait MallocUnconditionalSizeOf 

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

Like MallocSizeOf, but with a different name so it cannot be used accidentally with derive(MallocSizeOf). For use with types like Rc and Arc when appropriate (e.g. when measuring a “primary” reference).

Required Methods§

Source

fn unconditional_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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§