pub trait SizeOf {
fn size_of_children(&self, context: &mut Context);
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