Struct naga::Arena [−][src]
pub struct Arena<T> { /* fields omitted */ }
Expand description
An arena holding some kind of component (e.g., type, constant, instruction, etc.) that can be referenced.
Adding new items to the arena produces a strongly-typed Handle
.
The arena can be indexed using the given handle to obtain
a reference to the stored item.
Implementations
Extracts the inner vector.
Returns an iterator over the items stored in this arena, returning both the item’s handle and a reference to it.
Returns a iterator over the items stored in this arena, returning both the item’s handle and a mutable reference to it.
Adds a new value to the arena, returning a typed handle.
Fetch a handle to an existing type.
Adds a value with a custom check for uniqueness: returns a handle pointing to an existing element if the check succeeds, or adds a new element otherwise.
Adds a value with a check for uniqueness, where the check is plain comparison.
Get a mutable reference to an element in the arena.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl<T> RefUnwindSafe for Arena<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for Arena<T> where
T: UnwindSafe,