Struct arena::TypedArenaUnstable
[-] [+]
[src]
pub struct TypedArena<T> { // some fields omitted }
A faster arena that can hold objects of only one type.
Methods
impl<T> TypedArena<T>
fn new() -> TypedArena<T>
Creates a new TypedArena
with preallocated space for eight objects.
fn with_capacity(capacity: usize) -> TypedArena<T>
Creates a new TypedArena
with preallocated space for the given number of
objects.
fn alloc(&self, object: T) -> &mut T
Allocates an object in the TypedArena
, returning a reference to it.