Trait AbstractAllocator

Source
pub trait AbstractAllocator {
    type AllocationError: Debug;
    type Allocation: AbstractAllocatorAllocation;

    // Required methods
    fn allocate(
        &mut self,
        layout: Layout,
    ) -> Result<Self::Allocation, Self::AllocationError>;
    fn deallocate(&mut self, allocation: Self::Allocation);
}

Required Associated Types§

Required Methods§

Source

fn allocate( &mut self, layout: Layout, ) -> Result<Self::Allocation, Self::AllocationError>

Source

fn deallocate(&mut self, allocation: Self::Allocation)

Implementors§