pub struct QueryGuard<'a, Q: IsQuery + ?Sized>(/* private fields */);Expand description
A prepared and active query.
Iterate over queried items using QueryGuard::iter_mut.
Implementations§
Source§impl<'a, Q> QueryGuard<'a, Q>
impl<'a, Q> QueryGuard<'a, Q>
Sourcepub fn iter_mut(&mut self) -> QueryIter<'a, '_, Q>
pub fn iter_mut(&mut self) -> QueryIter<'a, '_, Q>
Iterate over matched component bundles.
Each component is wrapped with Entry, which provides access
to the entity id and modification data.
Sourcepub fn find_one(&mut self, entity_id: usize) -> Option<Q::QueryRow<'_>>
pub fn find_one(&mut self, entity_id: usize) -> Option<Q::QueryRow<'_>>
Find the component bundle with the given entity id.
This does not iterate. It locates the item by index.
Sourcepub fn par_iter_mut(
&mut self,
) -> Flatten<IntoIter<<Q as IsQuery>::ParQueryResult<'_>>>
pub fn par_iter_mut( &mut self, ) -> Flatten<IntoIter<<Q as IsQuery>::ParQueryResult<'_>>>
Iterate over matched component bundles, in parallel.
Each component is wrapped with Entry, which provides access
to the entity id and modification data.
Auto Trait Implementations§
impl<'a, Q> Freeze for QueryGuard<'a, Q>where
Q: ?Sized,
impl<'a, Q> !RefUnwindSafe for QueryGuard<'a, Q>
impl<'a, Q> Send for QueryGuard<'a, Q>
impl<'a, Q> Sync for QueryGuard<'a, Q>
impl<'a, Q> Unpin for QueryGuard<'a, Q>
impl<'a, Q> !UnwindSafe for QueryGuard<'a, Q>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more