Trait bump_scope::BumpAllocator

source ·
pub unsafe trait BumpAllocator: Allocator { }
Expand description

An allocator that allows grow(_zeroed), shrink and deallocate calls with pointers that were not allocated by this allocator. This trait is used for BumpBox::into_box to allow safely converting a BumpBox into a Box.

§Safety

  • grow(_zeroed), shrink and deallocate must be ok to be called with a pointer that was not allocated by this Allocator

Implementations on Foreign Types§

source§

impl<A: BumpAllocator> BumpAllocator for &A

Implementors§

source§

impl<A, const MIN_ALIGN: usize, const UP: bool, const GUARANTEED_ALLOCATED: bool> BumpAllocator for Bump<A, MIN_ALIGN, UP, GUARANTEED_ALLOCATED>
where MinimumAlignment<MIN_ALIGN>: SupportedMinimumAlignment, A: BaseAllocator<GUARANTEED_ALLOCATED>,

source§

impl<A, const MIN_ALIGN: usize, const UP: bool, const GUARANTEED_ALLOCATED: bool> BumpAllocator for BumpScope<'_, A, MIN_ALIGN, UP, GUARANTEED_ALLOCATED>
where MinimumAlignment<MIN_ALIGN>: SupportedMinimumAlignment, A: BaseAllocator<GUARANTEED_ALLOCATED>,

source§

impl<A: BumpAllocator> BumpAllocator for WithoutDealloc<A>

source§

impl<A: BumpAllocator> BumpAllocator for WithoutShrink<A>