Struct arena::TypedArena [] [src]

pub struct TypedArena<T> {
    // some fields omitted
}
Unstable

A faster arena that can hold objects of only one type.

Methods

impl<T> TypedArena<T>

fn new() -> TypedArena<T>

Unstable

Creates a new TypedArena with preallocated space for eight objects.

fn with_capacity(capacity: usize) -> TypedArena<T>

Unstable

Creates a new TypedArena with preallocated space for the given number of objects.

fn alloc(&self, object: T) -> &mut T

Unstable

Allocates an object in the TypedArena, returning a reference to it.

Trait Implementations

impl<T> Drop for TypedArena<T>

fn drop(&mut self)