[−][src]Crate deepsize
A utility for recursively measuring the size of an object
This contains the DeepSizeOf
trait, and re-exports
the DeepSizeOf
derive macro from deepsize_derive
use deepsize::DeepSizeOf; #[derive(DeepSizeOf)] struct Test { a: u32, b: Box<u8>, } fn main() { let object = Test { a: 15, b: Box::new(255), }; assert_eq!(object.deep_size_of(), 17); }
Macros
known_deep_size | For use on types defined in external crates with known heap sizes. |
Structs
Context | The context of which references have already been seen |
Traits
DeepSizeOf | A trait for measuring the size of an object and its children |