Struct immutable_arena::Arena [] [src]

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

An Arena<T> is a container of objects of type T that, once allocated, live as long as the containing arena. Within the arena, objects may refer to other objects using the Ref<'arena, T> smart-pointer type. These object references are allowed to form cycles. Once created, an object is immutable. However, any Ref<'arena, T> instances within the object may be set exactly once. The common usage pattern is to create objects and set all their refs before returning them to user code; the objects are subsequently completely immutable.

Methods

impl<T> Arena<T>
[src]

Create a new immutable-object arena.

Allocate a new immutable object on the arena.