Struct allocators::composable::NullAllocator
[−]
[src]
pub struct NullAllocator;
This allocator always fails. It will panic if you try to deallocate with it.
pub struct NullAllocator;
This allocator always fails. It will panic if you try to deallocate with it.
impl Allocator for NullAllocator
unsafe fn allocate_raw(&self, _size: usize, _align: usize) -> Result<Block, Error>
unsafe fn reallocate_raw<'a>(&'a self, block: Block<'a>, _new_size: usize) -> Result<Block<'a>, (Error, Block<'a>)>
unsafe fn deallocate_raw(&self, _block: Block)
fn allocate<T>(&self, val: T) -> Result<AllocBox<T, Self>, (Error, T)> where Self: Sized
fn make_place<T>(&self) -> Result<Place<T, Self>, Error> where Self: Sized
impl BlockOwner for NullAllocator
fn owns_block(&self, _block: &Block) -> bool
fn owns<'a, T, A: Allocator>(&self, val: &AllocBox<'a, T, A>) -> bool
fn with_fallback<O: BlockOwner>(self, other: O) -> Fallback<Self, O> where Self: Sized