Struct constellation::VecStorage
[−]
[src]
pub struct VecStorage<T> { /* fields omitted */ }
Provides methods to retrieve and mutate entity data stored inside a VecResource
.
Methods
impl<T> VecStorage<T>
[src]
fn iter(&self) -> VecStorageIter<T>
Gets an iterator over immutable references to all entity data stored in the resource.
fn iter_mut(&mut self) -> VecStorageIterMut<T>
Gets an iterator over mutable references to all entity data stored in the resource.
Trait Implementations
impl<T> ComponentResourceApi for VecStorage<T>
[src]
type Component = T
The type of data stored for each entity.
fn get(&self, entity: Entity) -> Option<&T>
Gets a shared reference to the component associated with the given entity, if present. Read more
unsafe fn get_unchecked(&self, entity: Entity) -> &T
Gets a shared reference to the component associated with the given entity without performing any bounds or liveness checking. Read more
fn get_mut(&mut self, entity: Entity) -> Option<&mut T>
Gets a mutable reference to the component associated with the given entity, if present. Read more
unsafe fn get_unchecked_mut(&mut self, entity: Entity) -> &mut T
Gets a mutable reference to the component associated with the given entity without performing any bounds or liveness checking. Read more