brotli_decompressor

Trait 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)

Implementations on Foreign Types§

Source§

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

Source§

type AllocatedMemory = WrapBox<T>

Source§

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

Source§

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

Implementors§

Source§

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

Source§

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