Expand description

Component storage types, implementations for component joins, etc.


An inverted storage type, only useful to iterate entities that do not have a particular component type.

BTreeMap-based storage.

Vector storage, like VecStorage, but allows safe access to the interior slices because unused slots are always initialized.

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

Join-able structure that yields all indices, returning Entry for all elements

Wrapper storage that tracks modifications, insertions, and removals of components through an EventChannel.

HashMap-based storage. Best suited for rare components.

The UnprotectedStorage together with the BitSet that knows about which elements are stored, and which are not.

A null storage type, used for cases where the component doesn’t contain any data and instead works as a simple flag.

An entry to a storage which has a component associated to the entity.

Pairs a storage with an index, meaning that the index is guaranteed to exist as long as the PairedStorage<C, S> exists.

Similar to a MaskedStorage and a Storage combined, but restricts usage to only getting and modifying the components. That means it’s not possible to modify the inner bitset so the iteration cannot be invalidated. In other words, no insertion or removal is allowed.

A wrapper around the masked storage and the generations vector. Can be used for safe lookup of components, insertions and removes. This is what World::read/write fetches for the user.

An entry to a storage which does not have a component associated to the entity.

Vector storage. Uses a simple Vec. Supposed to have maximum performance for the components mostly present in entities.


Component storage events received from a FlaggedStorage or any storage that implements Tracked.

Specifies that the RestrictedStorage can run in parallel immutably.

Specifies that the RestrictedStorage can run in parallel mutably.

Specifies that the RestrictedStorage cannot run in parallel.

Entry to a storage for convenient filling of components or removal based on whether the entity has a component.


A dynamic storage.

This is a marker trait which requires you to uphold the following guarantee:

Provides generic read access to both ReadStorage and WriteStorage

Provides generic write access to WriteStorage, both as a value and a mutable reference.

UnprotectedStorages that track modifications, insertions, and removals of components.

Tries to create a default value, returns an Err with the name of the storage and/or component if there’s no default.

Used by the framework to quickly join components.

Type Definitions

The status of an insert()ion into a storage. If the insertion was successful then the Ok value will contain the component that was replaced (if any).

A storage with read access.

A storage with read and write access.