pub trait MemoryUsage: Debug {
// Required methods
fn properties_required(&self) -> Properties;
fn memory_fitness(&self, properties: Properties) -> u32;
fn allocator_fitness(&self, kind: Kind) -> u32;
}
Expand description
Memory usage trait.
Required Methods§
Sourcefn properties_required(&self) -> Properties
fn properties_required(&self) -> Properties
Get set of properties required for the usage.
Sourcefn memory_fitness(&self, properties: Properties) -> u32
fn memory_fitness(&self, properties: Properties) -> u32
Get comparable fitness value for memory properties.
§Panics
This function will panic if properties set doesn’t contain required properties.
Sourcefn allocator_fitness(&self, kind: Kind) -> u32
fn allocator_fitness(&self, kind: Kind) -> u32
Get comparable fitness value for memory allocator.
Implementors§
impl MemoryUsage for MemoryUsageValue
Memory usage trait.