Struct arena::TypedArena
[−]
[src]
pub struct TypedArena<T> {
// some fields omitted
}Unstable (
rustc_private)A faster arena that can hold objects of only one type.
Methods
impl<T> TypedArena<T>[src]
fn new() -> TypedArena<T>
Unstable (
rustc_private)Creates a new TypedArena with preallocated space for many objects.
fn with_capacity(capacity: usize) -> TypedArena<T>
Unstable (
rustc_private)Creates a new TypedArena with preallocated space for the given number of
objects.
fn alloc(&self, object: T) -> &mut T
Unstable (
rustc_private)Allocates an object in the TypedArena, returning a reference to it.
fn clear(&mut self)
Unstable (
rustc_private)Clears the arena. Deallocates all but the longest chunk which may be reused.