pub unsafe trait Allocator {
    fn allocate(&self, layout: Layout) -> Result<NonNull<[u8]>, AllocError>;
    unsafe fn deallocate(&self, ptr: NonNull<u8>, layout: Layout);

    fn by_ref(&self) -> &Self { ... }
}
Expand description

A fallback for alloc::alloc::Allocator, which is currently unstable.

Safety

See alloc::alloc::Allocator.

Required Methods

Provided Methods

Implementations on Foreign Types

Implementors