pub fn query<Q: Query>(&self) -> QueryBorrow<'_, Q> {
        QueryBorrow::new(
            self,
            &self.world.entities().meta,
            self.world.archetypes_inner(),
        )
    }
/// Iterate over all entities that have certain components.
///
/// Calling `iter` on the returned value yields `(Entity, Q)` tuples, where `Q` is some query
/// type. A query type is any type for which an implementation of [`Query`] exists, e.g. `&T`,
/// `&mut T`, a tuple of query types, or an `Option` wrapping a query type, where `T` is any
/// component type. Components queried with `&mut` must only appear once. Entities which do not
/// have a component type referenced outside of an `Option` will be skipped.
///
/// Entities are yielded in arbitrary order.
///
/// The returned [`QueryBorrow`] can be further transformed with combinator methods; see its
/// documentation for details.
///
/// Iterating a query yields references with lifetimes bound to the [`QueryBorrow`] returned
/// here. To ensure those are invalidated, the return value of this method must be dropped for
/// its dynamic borrows from the world to be released. Similarly, lifetime rules ensure that
/// references obtained from a query cannot outlive the [`QueryBorrow`].
///
/// # Example
/// ```
/// # use hecs::*;
/// let mut world = World::new();
/// let a = world.spawn((123, true, "abc"));
/// let b = world.spawn((456, false));
/// let c = world.spawn((42, "def"));
/// let entities = world.query::<(&i32, &bool)>()
///     .iter()
///     .map(|(e, (&i, &b))| (e, i, b)) // Copy out of the world
///     .collect::<Vec<_>>();
/// assert_eq!(entities.len(), 2);
/// assert!(entities.contains(&(a, 123, true)));
/// assert!(entities.contains(&(b, 456, false)));
/// ```
Iterate over all entities that have certain components.

Entities are yielded in arbitrary order.

The returned [`QueryBorrow`] can be further transformed with combinator methods; see its
documentation for details.

Iterating a query yields references with lifetimes bound to the [`QueryBorrow`] returned
here. To ensure those are invalidated, the return value of this method must be dropped for
its dynamic borrows from the world to be released. Similarly, lifetime rules ensure that
references obtained from a query cannot outlive the [`QueryBorrow`].
Iterate over all entities that have certain components . Entities are yielded in arbitrary order . The returned [ ` QueryBorrow ` ] can be further transformed with combinator methods ; see its documentation for details . Iterating a query yields references with lifetimes bound to the [ ` QueryBorrow ` ] returned here . To ensure those are invalidated the return value of this method must be dropped for its dynamic borrows from the world to be released . Similarly lifetime rules ensure that references obtained from a query cannot outlive the [ ` QueryBorrow ` ] .
pub fn query<Q: Query>(&self) -> QueryBorrow<'_, Q> {
        QueryBorrow::new(
            self,
            &self.world.entities().meta,
            self.world.archetypes_inner(),
        )
    }
pub fn query < Q : Query > ( & self ) -> QueryBorrow < ' _ , Q > { QueryBorrow :: new ( self , & self . world . entities ( ) . meta , self . world . archetypes_inner ( ) , ) }
Iterate over all entities that have certain components.
Iterate over all entities that have certain components .
&self
&self
example
None
use hecs::*;
None