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)
Implementations on Foreign Types§
Implementors§
Source§impl<'a, T, U> Allocator<T> for StackAllocator<'a, T, U>where
T: 'a,
U: AllocatedSlice<&'a mut [T]>,
impl<'a, T, U> Allocator<T> for StackAllocator<'a, T, U>where
T: 'a,
U: AllocatedSlice<&'a mut [T]>,
type AllocatedMemory = AllocatedStackMemory<'a, T>
Source§impl<T> Allocator<T> for StandardAlloc
impl<T> Allocator<T> for StandardAlloc
type AllocatedMemory = WrapBox<T>
Source§impl<T: Clone> Allocator<T> for BrotliAlloc<T>
impl<T: Clone> Allocator<T> for BrotliAlloc<T>
type AllocatedMemory = WrapBox<T>
Source§impl<Ty: Sized + Default + Clone> Allocator<Ty> for SubclassableAllocator
Available on crate feature std only.
impl<Ty: Sized + Default + Clone> Allocator<Ty> for SubclassableAllocator
Available on crate feature
std only.