pub trait SizeOf {
// Required method
fn size_of_children(&self, context: &mut Context);
// Provided methods
fn size_of(&self) -> TotalSize { ... }
fn size_of_with_context(&self, context: &mut Context) { ... }
}Expand description
Types with a size that can be queried at runtime
Required Methods§
Sourcefn size_of_children(&self, context: &mut Context)
fn size_of_children(&self, context: &mut Context)
Gets the size of all “children” owned by this value, not including the size of the value itself.
This should add all heap allocations owned by the current value to the given context
Provided Methods§
Sourcefn size_of_with_context(&self, context: &mut Context)
fn size_of_with_context(&self, context: &mut Context)
Adds the size of the current value to the given Context,
including both the size of the value itself and all of its children