Trait rel_alloc::alloc::RelAllocator
source · [−]pub unsafe trait RelAllocator<E>: RegionalAllocator + Emplace<E, Self::Region> + Sizedwhere
E: DropRaw + RawRegionalAllocator<Region = Self::Region>,{ }
Expand description
An Allocator
that is suitable for allocating relative types.
Safety
When emplaced as an E
, the emplaced E
must function analogously to the
original allocator. Specifically, it must return the same results when
calling the analogous allocator methods from RawAllocator
and share the
same state between the two (e.g. allocating with one and freeing with the
other must be safe and function properly).