Type Definition entity_data::archetype::component::ComponentStorageMut
source · pub type ComponentStorageMut<'a, C> = ComponentStorage<'a, C, &'a mut UnsafeVec>;
Implementations§
source§impl<'a, C: Component> ComponentStorageMut<'a, C>
impl<'a, C: Component> ComponentStorageMut<'a, C>
sourcepub unsafe fn get_unchecked_mut(&mut self, entity_id: ArchEntityId) -> &'a mut C
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.
sourcepub fn get_mut(&mut self, entity_id: ArchEntityId) -> Option<&'a mut C>
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.