pub struct QueryMut<'w, T: Component> { /* private fields */ }Expand description
Exclusive write access to all entities with component T.
Implementations§
Source§impl<'w, T: Component> QueryMut<'w, T>
impl<'w, T: Component> QueryMut<'w, T>
Sourcepub fn iter_mut(
&mut self,
) -> impl Iterator<Item = (Entity, &mut Mut<'w, T>)> + '_
pub fn iter_mut( &mut self, ) -> impl Iterator<Item = (Entity, &mut Mut<'w, T>)> + '_
Iterate mutably over matching (Entity, &mut Mut<T>) pairs.
Reading through Mut<T> (via Deref) does not stamp the change tick.
Only writing through DerefMut stamps it, so query_changed sees
only entities that were actually mutated.
Trait Implementations§
Source§impl<T: Component> SystemParam for QueryMut<'_, T>
impl<T: Component> SystemParam for QueryMut<'_, T>
Auto Trait Implementations§
impl<'w, T> !Send for QueryMut<'w, T>
impl<'w, T> !Sync for QueryMut<'w, T>
impl<'w, T> !UnwindSafe for QueryMut<'w, T>
impl<'w, T> Freeze for QueryMut<'w, T>
impl<'w, T> RefUnwindSafe for QueryMut<'w, T>
impl<'w, T> Unpin for QueryMut<'w, T>
impl<'w, T> UnsafeUnpin for QueryMut<'w, T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more