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.

Trait Implementations

impl<T> Drop for TypedArena<T>
[src]

fn drop(&mut self)

A method called when the value goes out of scope. Read more

impl<T: Send> Send for TypedArena<T>
[src]