pub trait MemUse {
// Required methods
fn mem_use_inline(&self) -> usize;
fn mem_use_indirect(&self) -> usize;
// Provided method
fn mem_use(&self) -> usize { ... }
}
Required Methods§
Sourcefn mem_use_inline(&self) -> usize
fn mem_use_inline(&self) -> usize
Calculates inline memory usage (ex. heap usage of a Vec
, always 24
bytes on 64-bit architextures)
Sourcefn mem_use_indirect(&self) -> usize
fn mem_use_indirect(&self) -> usize
Calculates indirect memory usage (ex. heap usage of a Vec
)