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>);
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
Avoids the cost of the dynamic borrow checking performed by query
.