bump_scope

Trait BaseAllocator

Source
pub trait BaseAllocator<const GUARANTEED_ALLOCATED: bool = true>:
    Allocator
    + Clone
    + Sealed<GUARANTEED_ALLOCATED> { }
Expand description

Trait that any allocator used as a base allocator of a bump allocator needs to implement.

Every Allocator that implements Clone automatically implements BaseAllocator when GUARANTEED_ALLOCATED. When not guaranteed allocated, allocators are additionally required to implement Default.

This trait is sealed: the list of implementors below is total.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<A> BaseAllocator for A
where A: Allocator + Clone,

Source§

impl<A> BaseAllocator<false> for A
where A: Allocator + Clone + Default,