Struct arena::TypedArena[][src]

pub struct TypedArena<T> { /* fields omitted */ }

An arena that can hold objects of only one type.

Methods

impl<T> TypedArena<T>
[src]

Creates a new TypedArena.

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

Allocates a slice of objects that are copied into the TypedArena, returning a mutable reference to it. Will panic if passed a zero-sized types.

Panics:

  • Zero-sized types
  • Zero-length slices

Clears the arena. Deallocates all but the longest chunk which may be reused.

Trait Implementations

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

Executes the destructor for this type. Read more

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

Auto Trait Implementations

impl<T> !Sync for TypedArena<T>