rendy_memory

Trait MemoryUsage

Source
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§

Source

fn properties_required(&self) -> Properties

Get set of properties required for the usage.

Source

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.

Source

fn allocator_fitness(&self, kind: Kind) -> u32

Get comparable fitness value for memory allocator.

Implementors§