Struct specs::VecStorage
[−]
[src]
pub struct VecStorage<T> { // some fields omitted }
Vec-based storage, stores the generations of the data in order to match with given entities. Supposed to have maximum performance for the components mostly present in entities.
Trait Implementations
impl<T> Drop for VecStorage<T>
[src]
impl<T> StorageBase for VecStorage<T>
[src]
impl<T> Storage<T> for VecStorage<T>
[src]
type UnprotectedStorage = InnerVec<T>
Used during iterator
fn new() -> Self
Creates a new Storage<T>
. This is called when you register a new component type within the world. Read more
fn get(&self, e: Entity) -> Option<&T>
Tries to read the data associated with an Entity
.
fn get_mut(&mut self, e: Entity) -> Option<&mut T>
Tries to mutate the data associated with an Entity
.
fn insert(&mut self, e: Entity, v: T)
Inserts new data for a given Entity
.
fn remove(&mut self, e: Entity) -> Option<T>
Removes the data associated with an Entity
.
fn open(&self) -> (&BitSet, &InnerVec<T>)
Splits the BitSet
from the storage for use by the Join
iterator. Read more
fn open_mut(&mut self) -> (&BitSet, &mut InnerVec<T>)
Splits the BitSet
mutably from the storage for use by the Join
iterator. Read more