Struct hecs::PreparedQuery [−][src]
pub struct PreparedQuery<Q: Query> { /* fields omitted */ }
Expand description
A prepared query can be stored independently of the World to amortize query set-up costs.
Implementations
Query world, using dynamic borrow checking
This will panic if it would violate an existing unique reference or construct an invalid unique reference.
pub fn query_mut<'q>(
&'q mut self,
world: &'q mut World
) -> PreparedQueryIter<'q, Q>ⓘNotable traits for PreparedQueryIter<'q, Q>
impl<'q, Q: Query> Iterator for PreparedQueryIter<'q, Q> type Item = (Entity, QueryItem<'q, Q>);
pub fn query_mut<'q>(
&'q mut self,
world: &'q mut World
) -> PreparedQueryIter<'q, Q>ⓘNotable traits for PreparedQueryIter<'q, Q>
impl<'q, Q: Query> Iterator for PreparedQueryIter<'q, Q> type Item = (Entity, QueryItem<'q, Q>);Query a uniquely borrowed world
This avoids the cost of the dynamic borrow checking.
that is required by [borrow][Self::borrow]
Trait Implementations
Auto Trait Implementations
impl<Q> RefUnwindSafe for PreparedQuery<Q> where
<<Q as Query>::Fetch as Fetch<'static>>::State: RefUnwindSafe, impl<Q> Send for PreparedQuery<Q> where
<<Q as Query>::Fetch as Fetch<'static>>::State: Send, impl<Q> Sync for PreparedQuery<Q> where
<<Q as Query>::Fetch as Fetch<'static>>::State: Sync, impl<Q> Unpin for PreparedQuery<Q>impl<Q> UnwindSafe for PreparedQuery<Q> where
<<Q as Query>::Fetch as Fetch<'static>>::State: UnwindSafe,