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§
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)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".