Struct bevy_ecs::query::QueryState[][src]

pub struct QueryState<Q: WorldQuery, F: WorldQuery = ()> where
    F::Fetch: FilterFetch
{ /* fields omitted */ }

Implementations

impl<Q: WorldQuery, F: WorldQuery> QueryState<Q, F> where
    F::Fetch: FilterFetch
[src]

pub fn new(world: &mut World) -> Self[src]

pub fn validate_world_and_update_archetypes(&mut self, world: &World)[src]

pub fn new_archetype(&mut self, archetype: &Archetype)[src]

pub fn get<'w>(
    &mut self,
    world: &'w World,
    entity: Entity
) -> Result<<Q::Fetch as Fetch<'w>>::Item, QueryEntityError> where
    Q::Fetch: ReadOnlyFetch
[src]

pub fn get_mut<'w>(
    &mut self,
    world: &'w mut World,
    entity: Entity
) -> Result<<Q::Fetch as Fetch<'w>>::Item, QueryEntityError>
[src]

pub unsafe fn get_unchecked<'w>(
    &mut self,
    world: &'w World,
    entity: Entity
) -> Result<<Q::Fetch as Fetch<'w>>::Item, QueryEntityError>
[src]

Safety

This does not check for mutable query correctness. To be safe, make sure mutable queries have unique access to the components they query.

pub unsafe fn get_unchecked_manual<'w>(
    &self,
    world: &'w World,
    entity: Entity,
    last_change_tick: u32,
    change_tick: u32
) -> Result<<Q::Fetch as Fetch<'w>>::Item, QueryEntityError>
[src]

Safety

This does not check for mutable query correctness. To be safe, make sure mutable queries have unique access to the components they query.

pub fn iter<'w, 's>(&'s mut self, world: &'w World) -> QueryIter<'w, 's, Q, F>

Notable traits for QueryIter<'w, 's, Q, F>

impl<'w, 's, Q: WorldQuery, F: WorldQuery> Iterator for QueryIter<'w, 's, Q, F> where
    F::Fetch: FilterFetch
type Item = <Q::Fetch as Fetch<'w>>::Item;
where
    Q::Fetch: ReadOnlyFetch
[src]

pub fn iter_mut<'w, 's>(
    &'s mut self,
    world: &'w mut World
) -> QueryIter<'w, 's, Q, F>

Notable traits for QueryIter<'w, 's, Q, F>

impl<'w, 's, Q: WorldQuery, F: WorldQuery> Iterator for QueryIter<'w, 's, Q, F> where
    F::Fetch: FilterFetch
type Item = <Q::Fetch as Fetch<'w>>::Item;
[src]

pub unsafe fn iter_unchecked<'w, 's>(
    &'s mut self,
    world: &'w World
) -> QueryIter<'w, 's, Q, F>

Notable traits for QueryIter<'w, 's, Q, F>

impl<'w, 's, Q: WorldQuery, F: WorldQuery> Iterator for QueryIter<'w, 's, Q, F> where
    F::Fetch: FilterFetch
type Item = <Q::Fetch as Fetch<'w>>::Item;
[src]

Safety

This does not check for mutable query correctness. To be safe, make sure mutable queries have unique access to the components they query.

pub fn for_each<'w>(
    &mut self,
    world: &'w World,
    func: impl FnMut(<Q::Fetch as Fetch<'w>>::Item)
) where
    Q::Fetch: ReadOnlyFetch
[src]

pub fn for_each_mut<'w>(
    &mut self,
    world: &'w mut World,
    func: impl FnMut(<Q::Fetch as Fetch<'w>>::Item)
)
[src]

pub unsafe fn for_each_unchecked<'w>(
    &mut self,
    world: &'w World,
    func: impl FnMut(<Q::Fetch as Fetch<'w>>::Item)
)
[src]

Safety

This does not check for mutable query correctness. To be safe, make sure mutable queries have unique access to the components they query.

pub fn par_for_each<'w>(
    &mut self,
    world: &'w World,
    task_pool: &TaskPool,
    batch_size: usize,
    func: impl Fn(<Q::Fetch as Fetch<'w>>::Item) + Send + Sync + Clone
) where
    Q::Fetch: ReadOnlyFetch
[src]

pub fn par_for_each_mut<'w>(
    &mut self,
    world: &'w mut World,
    task_pool: &TaskPool,
    batch_size: usize,
    func: impl Fn(<Q::Fetch as Fetch<'w>>::Item) + Send + Sync + Clone
)
[src]

pub unsafe fn par_for_each_unchecked<'w>(
    &mut self,
    world: &'w World,
    task_pool: &TaskPool,
    batch_size: usize,
    func: impl Fn(<Q::Fetch as Fetch<'w>>::Item) + Send + Sync + Clone
)
[src]

Safety

This does not check for mutable query correctness. To be safe, make sure mutable queries have unique access to the components they query.

pub unsafe fn par_for_each_unchecked_manual<'w, 's>(
    &'s self,
    world: &'w World,
    task_pool: &TaskPool,
    batch_size: usize,
    func: impl Fn(<Q::Fetch as Fetch<'w>>::Item) + Send + Sync + Clone,
    last_change_tick: u32,
    change_tick: u32
)
[src]

Safety

This does not check for mutable query correctness. To be safe, make sure mutable queries have unique access to the components they query. This does not validate that world.id() matches self.world_id. Calling this on a world with a mismatched WorldId is unsafe.

Trait Implementations

impl<'a, Q: WorldQuery + 'static, F: WorldQuery + 'static> SystemParamFetch<'a> for QueryState<Q, F> where
    F::Fetch: FilterFetch
[src]

type Item = Query<'a, Q, F>

impl<Q: WorldQuery + 'static, F: WorldQuery + 'static> SystemParamState for QueryState<Q, F> where
    F::Fetch: FilterFetch
[src]

type Config = ()

Auto Trait Implementations

impl<Q, F> RefUnwindSafe for QueryState<Q, F> where
    <F as WorldQuery>::State: RefUnwindSafe,
    <Q as WorldQuery>::State: RefUnwindSafe

impl<Q, F> Send for QueryState<Q, F>

impl<Q, F> Sync for QueryState<Q, F>

impl<Q, F> Unpin for QueryState<Q, F> where
    <F as WorldQuery>::State: Unpin,
    <Q as WorldQuery>::State: Unpin

impl<Q, F> UnwindSafe for QueryState<Q, F> where
    <F as WorldQuery>::State: UnwindSafe,
    <Q as WorldQuery>::State: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Component for T where
    T: 'static + Send + Sync
[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Any + Send + Sync
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,