Struct constellation::MapStorage
[−]
[src]
pub struct MapStorage<T> { /* fields omitted */ }
Provides methods to retrieve and mutate entity data
stored inside a MapResource
.
Methods
impl<T> MapStorage<T>
[src]
fn iter_components(&self) -> Values<Entity, T>
Gets an iterator over all entity data stored in the resource.
fn iter_components_mut(&mut self) -> ValuesMut<Entity, T>
Gets an iterator over all entity data stored in the resource.
fn iter(&self) -> Iter<Entity, T>
Gets an iterator over all entity data stored in the resource.
fn iter_mut(&mut self) -> IterMut<Entity, T>
Gets an iterator over all entity data stored in the resource.
Trait Implementations
impl<T> ComponentResourceApi for MapStorage<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