Struct specs::DenseVecStorage
[−]
[src]
pub struct DenseVecStorage<T> { /* fields omitted */ }Dense vector storage. Has a redirection 2-way table between entities and components, allowing to leave no gaps within the data.
Trait Implementations
impl<T> Default for DenseVecStorage<T>[src]
impl<T> UnprotectedStorage<T> for DenseVecStorage<T>[src]
unsafe fn clean<F>(&mut self, _: F) where
F: Fn(Index) -> bool, [src]
F: Fn(Index) -> bool,
Clean the storage given a check to figure out if an index is valid or not. Allows us to safely drop the storage. Read more
unsafe fn get(&self, id: Index) -> &T[src]
Tries reading the data associated with an Index. This is unsafe because the external set used to protect this storage is absent. Read more
unsafe fn get_mut(&mut self, id: Index) -> &mut T[src]
Tries mutating the data associated with an Index. This is unsafe because the external set used to protect this storage is absent. Read more
unsafe fn insert(&mut self, id: Index, v: T)[src]
Inserts new data for a given Index.
unsafe fn remove(&mut self, id: Index) -> T[src]
Removes the data associated with an Index.