Struct stack_graphs::arena::Arena[][src]

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

Manages the life cycle of instances of type T. You can allocate new instances of T from the arena. All of the instances managed by this arena will be dropped as a single operation when the arena itself is dropped.

Implementations

Creates a new arena.

Adds a new instance to this arena, returning a stable handle to it.

Note that we do not deduplicate instances of T in any way. If you add two instances that have the same content, you will get distinct handles for each one.

Dereferences a handle to an instance owned by this arena, returning a reference to it.

Dereferences a handle to an instance owned by this arena, returning a mutable reference to it.

Returns an iterator of all of the handles in this arena. (Note that this iterator does not retain a reference to the arena!)

Returns the number of instances stored in this arena.

Trait Implementations

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.