pub struct ArenaAllocator { /* private fields */ }
Implementations§
Trait Implementations§
Source§impl Allocator for ArenaAllocator
impl Allocator for ArenaAllocator
Source§fn alloc(&self, layout: Layout) -> Result<GlobalPtr<u8>, AllocError>
fn alloc(&self, layout: Layout) -> Result<GlobalPtr<u8>, AllocError>
Allocate based on layout within this allocator. Returns a global pointer
to the start of the allocation. Read more
Source§fn alloc_with<T>(
&self,
f: impl FnOnce(RefMut<'_, MaybeUninit<T>>) -> Result<RefMut<'_, T>, AllocError>,
) -> Result<GlobalPtr<u8>, AllocError>
fn alloc_with<T>( &self, f: impl FnOnce(RefMut<'_, MaybeUninit<T>>) -> Result<RefMut<'_, T>, AllocError>, ) -> Result<GlobalPtr<u8>, AllocError>
Allocate based on layout within this allocator. Returns a global pointer
to the start of the allocation. Read more
Source§impl Clone for ArenaAllocator
impl Clone for ArenaAllocator
Source§fn clone(&self) -> ArenaAllocator
fn clone(&self) -> ArenaAllocator
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreimpl Copy for ArenaAllocator
impl SingleObjectAllocator for ArenaAllocator
Auto Trait Implementations§
impl Freeze for ArenaAllocator
impl !ObjSafe for ArenaAllocator
impl RefUnwindSafe for ArenaAllocator
impl !Send for ArenaAllocator
impl StoreCopy for ArenaAllocator
impl !Sync for ArenaAllocator
impl Unpin for ArenaAllocator
impl UnwindSafe for ArenaAllocator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more