pub trait Allocator<B: Backend> {
type Block: Block<B>;
// Required methods
fn kind() -> Kind;
fn alloc(
&mut self,
device: &B::Device,
size: u64,
align: u64,
) -> Result<(Self::Block, u64), AllocationError>;
fn free(&mut self, device: &B::Device, block: Self::Block) -> u64;
}
Expand description
Allocator trait implemented for various allocators.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.