Struct colosseum::Arena
[−]
[src]
pub struct Arena<T> { /* fields omitted */ }
A simple arena allocator.
Methods
impl<T> Arena<T>
[src]
fn new() -> Arena<T>
Create a new Arena
with a default size of approximately 1024 bytes.
fn with_capacity(n: usize) -> Arena<T>
Create a new Arena
with enough capacity for at least n
T
s without
a reallocation.
fn alloc(&self, t: T) -> &mut T
Allocate a single object in the arena.
fn alloc_extend<I: Iterator<Item = T>>(&self, iterable: I) -> &mut [T]
Allocate an arbitrary number of objects in the arena.