pub struct Arena<T> {
    items: Vec<Entry<T>>,
    capacity: usize,
    generation: u64,
    free_list_head: Option<usize>,
}
Expand description

A generational arena for allocating memory based off a vector. Every entry is associated with a generation counter to uniquely identify newer allocations from older reclaimed allocations at the same position in the vector. This is inspired from the crate “generational-arena”

Fields

items: Vec<Entry<T>>capacity: usizegeneration: u64free_list_head: Option<usize>

Implementations

Trait Implementations

Returns the “default value” for a 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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.