pub trait Allocator<T> {
type AllocatedMemory: AllocatedSlice<T>;
// Required methods
fn alloc_cell(&mut self, len: usize) -> Self::AllocatedMemory;
fn free_cell(&mut self, data: Self::AllocatedMemory);
}Required Associated Types§
type AllocatedMemory: AllocatedSlice<T>
Required Methods§
fn alloc_cell(&mut self, len: usize) -> Self::AllocatedMemory
fn free_cell(&mut self, data: Self::AllocatedMemory)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".