Struct apecs::QueryGuard
source · [−]Expand description
A prepared and active query.
Iterate over queried items using QueryGuard::iter_mut.
Implementations
sourceimpl<'a, Q> QueryGuard<'a, Q>where
Q: IsQuery + ?Sized,
impl<'a, Q> QueryGuard<'a, Q>where
Q: IsQuery + ?Sized,
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> !RefUnwindSafe for QueryGuard<'a, Q>
impl<'a, Q: ?Sized> Send for QueryGuard<'a, Q>where
<Q as IsQuery>::LockedColumns<'a>: Send,
impl<'a, Q: ?Sized> Sync for QueryGuard<'a, Q>where
<Q as IsQuery>::LockedColumns<'a>: Sync,
impl<'a, Q: ?Sized> Unpin for QueryGuard<'a, Q>where
<Q as IsQuery>::LockedColumns<'a>: Unpin,
impl<'a, Q> !UnwindSafe for QueryGuard<'a, Q>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more