Trait alloc_stdlib::Allocator

source ·
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§

Required Methods§

source

fn alloc_cell(&mut self, len: usize) -> Self::AllocatedMemory

source

fn free_cell(&mut self, data: Self::AllocatedMemory)

Implementors§

source§

impl<'a, T, U> Allocator<T> for StackAllocator<'a, T, U>
where T: 'a, U: AllocatedSlice<&'a mut [T]>,

source§

impl<T: Clone + Default> Allocator<T> for StandardAlloc

source§

impl<T: Clone> Allocator<T> for HeapAlloc<T>