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)

Implementations on Foreign Types§

source§

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

§

type AllocatedMemory = WrapBox<T>

source§

fn alloc_cell(&mut self, len: usize) -> WrapBox<T>

source§

fn free_cell(&mut self, _data: WrapBox<T>)

Implementors§