Struct oxygengine_core::ecs::DenseVecStorage[][src]

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

Dense vector storage. Has a redirection 2-way table between entities and components, allowing to leave no gaps within the data.

Note that this only stores the data (T) densely; indices to the data are stored in a sparse Vec.

as_slice() and as_mut_slice() indices are local to this DenseVecStorage at this particular moment. These indices cannot be compared with indices from any other storage, and a particular entity’s position within this slice may change over time.

Trait Implementations

Returns the “default value” for a type. Read more

Clean the storage given a bitset with bits set for valid indices. Allows us to safely drop the storage. Read more

Tries reading the data associated with an Index. This is unsafe because the external set used to protect this storage is absent. Read more

Tries mutating the data associated with an Index. This is unsafe because the external set used to protect this storage is absent. Read more

Inserts new data for a given Index. Read more

Removes the data associated with an Index. Read more

Drops the data associated with an Index. This is simply more efficient than remove and can be used if the data is no longer needed. 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.

Tries to create the default.

Calls try_default and panics on an error case.

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.