pub type ComponentStorageMut<'a, C> = ComponentStorage<'a, C, &'a mut UnsafeVec>;

Implementations§

source§

impl<'a, C: Component> ComponentStorageMut<'a, C>

source

pub unsafe fn get_unchecked_mut(&mut self, entity_id: ArchEntityId) -> &'a mut C

Returns a mutable reference to the component C of the specified entity id. Safety: component at entity_id must exist.

source

pub fn get_mut(&mut self, entity_id: ArchEntityId) -> Option<&'a mut C>

Returns a mutable reference to the component C of the specified entity id.

source

pub fn iter_mut(&'a mut self) -> IterMut<'a, C, &mut Self>

Returns an iterator over all components.

Trait Implementations§

source§

impl<'a, C: Component + 'a> IntoIterator for ComponentStorageMut<'a, C>

source§

fn into_iter(self) -> Self::IntoIter

Returns an iterator over all components.

§

type Item = &'a mut C

The type of the elements being iterated over.
§

type IntoIter = IterMut<'a, C, ComponentStorage<'a, C, &'a UnsafeVec>>

Which kind of iterator are we turning this into?