pub trait Allocator<B: Backend> {
type Block: Block<B>;
const KIND: Kind;
// Required methods
fn alloc(
&mut self,
device: &B::Device,
size: Size,
align: Size,
) -> Result<(Self::Block, Size), AllocationError>;
fn free(&mut self, device: &B::Device, block: Self::Block) -> Size;
}Expand description
Allocator trait implemented for various allocators.
Required Associated Constants§
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.