Struct fixed_typed_arena::Arena
source · [−]pub struct Arena<T, const CHUNK_SIZE: usize>(_);
Expand description
An arena that allocates items of type T
in non-amortized O(1) (constant)
time.
The arena allocates fixed-size chunks of memory, each able to hold up to
CHUNK_SIZE
items. All items are allocated on the heap.
Panics
The arena may panic when created or used if
mem::size_of::<T>()
times
CHUNK_SIZE
is greater than usize::MAX
.
Implementations
Trait Implementations
Auto Trait Implementations
impl<T, const CHUNK_SIZE: usize> !RefUnwindSafe for Arena<T, CHUNK_SIZE>
impl<T, const CHUNK_SIZE: usize> Send for Arena<T, CHUNK_SIZE> where
T: Send,
impl<T, const CHUNK_SIZE: usize> !Sync for Arena<T, CHUNK_SIZE>
impl<T, const CHUNK_SIZE: usize> Unpin for Arena<T, CHUNK_SIZE> where
T: Unpin,
impl<T, const CHUNK_SIZE: usize> UnwindSafe for Arena<T, CHUNK_SIZE> where
T: UnwindSafe + RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more