pub trait ExternalAllocator {
// Required methods
fn allocate(&mut self, size: usize) -> Result<NonNull<u8>, ArenaError>;
fn deallocate(&mut self, ptr: NonNull<u8>, size: usize);
}Expand description
External allocator trait for growing arenas
Required Methods§
fn allocate(&mut self, size: usize) -> Result<NonNull<u8>, ArenaError>
fn deallocate(&mut self, ptr: NonNull<u8>, size: usize)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".