pub unsafe trait QueryData: WorldQuery {
    type ReadOnly: ReadOnlyQueryData<State = Self::State>;
}
Expand description

Types that can be fetched from a World using a Query.

There are many types that natively implement this trait:

  • Component references. Fetches a component by reference (immutably or mutably).
  • QueryData tuples. If every element of a tuple implements QueryData, then the tuple itself also implements the same trait. This enables a single Query to access multiple components. Due to the current lack of variadic generics in Rust, the trait has been implemented for tuples from 0 to 15 elements, but nesting of tuples allows infinite WorldQuerys.
  • Entity. Gets the identifier of the queried entity.
  • Option. By default, a world query only tests entities that have the matching component types. Wrapping it into an Option will increase the query search space, and it will return None if an entity doesn’t satisfy the WorldQuery.
  • AnyOf. Equivalent to wrapping each world query inside it into an Option.
  • Ref. Similar to change detection filters but it is used as a query fetch parameter. It exposes methods to check for changes to the wrapped component.
  • Has. Returns a bool indicating whether the entity has the specified component.

Implementing the trait manually can allow for a fundamentally new type of behavior.

Trait derivation

Query design can be easily structured by deriving QueryData for custom types. Despite the added complexity, this approach has several advantages over using QueryData tuples. The most relevant improvements are:

  • Reusability across multiple systems.
  • There is no need to destructure a tuple since all fields are named.
  • Subqueries can be composed together to create a more complex query.
  • Methods can be implemented for the query items.
  • There is no hardcoded limit on the number of elements.

This trait can only be derived for structs, if each field also implements QueryData.

use bevy_ecs::query::QueryData;

#[derive(QueryData)]
struct MyQuery {
    entity: Entity,
    // It is required that all reference lifetimes are explicitly annotated, just like in any
    // struct. Each lifetime should be 'static.
    component_a: &'static ComponentA,
    component_b: &'static ComponentB,
}

fn my_system(query: Query<MyQuery>) {
    for q in &query {
        q.component_a;
    }
}

Macro expansion

Expanding the macro will declare one or three additional structs, depending on whether or not the struct is marked as mutable. For a struct named X, the additional structs will be:

Struct namemutable onlyDescription
XItemThe type of the query item for X
XReadOnlyItemThe type of the query item for XReadOnly
XReadOnlyReadOnly variant of X

Adding mutable references

Simply adding mutable references to a derived QueryData will result in a compilation error:

#[derive(QueryData)]
struct CustomQuery {
    component_a: &'static mut ComponentA,
}

To grant mutable access to components, the struct must be marked with the #[query_data(mutable)] attribute. This will also create three more structs that will be used for accessing the query immutably (see table above).

#[derive(QueryData)]
#[query_data(mutable)]
struct CustomQuery {
    component_a: &'static mut ComponentA,
}

Adding methods to query items

It is possible to add methods to query items in order to write reusable logic about related components. This will often make systems more readable because low level logic is moved out from them. It is done by adding impl blocks with methods for the -Item or -ReadOnlyItem generated structs.

#[derive(Component)]
struct Health(f32);

#[derive(Component)]
struct Buff(f32);

#[derive(QueryData)]
#[query_data(mutable)]
struct HealthQuery {
    health: &'static mut Health,
    buff: Option<&'static mut Buff>,
}

// `HealthQueryItem` is only available when accessing the query with mutable methods.
impl<'w> HealthQueryItem<'w> {
    fn damage(&mut self, value: f32) {
        self.health.0 -= value;
    }

    fn total(&self) -> f32 {
        self.health.0 + self.buff.as_deref().map_or(0.0, |Buff(buff)| *buff)
    }
}

// `HealthQueryReadOnlyItem` is only available when accessing the query with immutable methods.
impl<'w> HealthQueryReadOnlyItem<'w> {
    fn total(&self) -> f32 {
        self.health.0 + self.buff.map_or(0.0, |Buff(buff)| *buff)
    }
}

fn my_system(mut health_query: Query<HealthQuery>) {
    // The item returned by the iterator is of type `HealthQueryReadOnlyItem`.
    for health in health_query.iter() {
        println!("Total: {}", health.total());
    }
    // The item returned by the iterator is of type `HealthQueryItem`.
    for mut health in &mut health_query {
        health.damage(1.0);
        println!("Total (mut): {}", health.total());
    }
}

Deriving traits for query items

The QueryData derive macro does not automatically implement the traits of the struct to the query item types. Something similar can be done by using the #[query_data(derive(...))] attribute. This will apply the listed derivable traits to the query item structs.

#[derive(QueryData)]
#[query_data(mutable, derive(Debug))]
struct CustomQuery {
    component_a: &'static ComponentA,
}

// This function statically checks that `T` implements `Debug`.
fn assert_debug<T: std::fmt::Debug>() {}

assert_debug::<CustomQueryItem>();
assert_debug::<CustomQueryReadOnlyItem>();

Query composition

It is possible to use any QueryData as a field of another one. This means that a QueryData can also be used as a subquery, potentially in multiple places.

#[derive(QueryData)]
struct SubQuery {
    component_a: &'static ComponentA,
    component_b: &'static ComponentB,
}

#[derive(QueryData)]
struct MyQuery {
    subquery: SubQuery,
    component_c: &'static ComponentC,
}

Generic Queries

When writing generic code, it is often necessary to use PhantomData to constrain type parameters. Since QueryData is implemented for all PhantomData<T> types, this pattern can be used with this macro.

#[derive(QueryData)]
pub struct GenericQuery<T> {
    id: Entity,
    marker: PhantomData<T>,
}

Safety

Component access of Self::ReadOnly must be a subset of Self and Self::ReadOnly must match exactly the same archetypes/tables as Self

Required Associated Types§

source

type ReadOnly: ReadOnlyQueryData<State = Self::State>

The read-only variant of this QueryData, which satisfies the ReadOnlyQueryData trait.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl QueryData for ()

§

type ReadOnly = ()

source§

impl<'__w, T> QueryData for &'__w mut T
where T: Component,

SAFETY: access of &T is a subset of &mut T

source§

impl<F0> QueryData for (F0,)
where F0: QueryData,

§

type ReadOnly = (<F0 as QueryData>::ReadOnly,)

source§

impl<F0, F1> QueryData for (F0, F1)
where F0: QueryData, F1: QueryData,

§

type ReadOnly = (<F0 as QueryData>::ReadOnly, <F1 as QueryData>::ReadOnly)

source§

impl<F0, F1, F2> QueryData for (F0, F1, F2)
where F0: QueryData, F1: QueryData, F2: QueryData,

§

type ReadOnly = (<F0 as QueryData>::ReadOnly, <F1 as QueryData>::ReadOnly, <F2 as QueryData>::ReadOnly)

source§

impl<F0, F1, F2, F3> QueryData for (F0, F1, F2, F3)
where F0: QueryData, F1: QueryData, F2: QueryData, F3: QueryData,

§

type ReadOnly = (<F0 as QueryData>::ReadOnly, <F1 as QueryData>::ReadOnly, <F2 as QueryData>::ReadOnly, <F3 as QueryData>::ReadOnly)

source§

impl<F0, F1, F2, F3, F4> QueryData for (F0, F1, F2, F3, F4)
where F0: QueryData, F1: QueryData, F2: QueryData, F3: QueryData, F4: QueryData,

§

type ReadOnly = (<F0 as QueryData>::ReadOnly, <F1 as QueryData>::ReadOnly, <F2 as QueryData>::ReadOnly, <F3 as QueryData>::ReadOnly, <F4 as QueryData>::ReadOnly)

source§

impl<F0, F1, F2, F3, F4, F5> QueryData for (F0, F1, F2, F3, F4, F5)
where F0: QueryData, F1: QueryData, F2: QueryData, F3: QueryData, F4: QueryData, F5: QueryData,

§

type ReadOnly = (<F0 as QueryData>::ReadOnly, <F1 as QueryData>::ReadOnly, <F2 as QueryData>::ReadOnly, <F3 as QueryData>::ReadOnly, <F4 as QueryData>::ReadOnly, <F5 as QueryData>::ReadOnly)

source§

impl<F0, F1, F2, F3, F4, F5, F6> QueryData for (F0, F1, F2, F3, F4, F5, F6)
where F0: QueryData, F1: QueryData, F2: QueryData, F3: QueryData, F4: QueryData, F5: QueryData, F6: QueryData,

§

type ReadOnly = (<F0 as QueryData>::ReadOnly, <F1 as QueryData>::ReadOnly, <F2 as QueryData>::ReadOnly, <F3 as QueryData>::ReadOnly, <F4 as QueryData>::ReadOnly, <F5 as QueryData>::ReadOnly, <F6 as QueryData>::ReadOnly)

source§

impl<F0, F1, F2, F3, F4, F5, F6, F7> QueryData for (F0, F1, F2, F3, F4, F5, F6, F7)
where F0: QueryData, F1: QueryData, F2: QueryData, F3: QueryData, F4: QueryData, F5: QueryData, F6: QueryData, F7: QueryData,

§

type ReadOnly = (<F0 as QueryData>::ReadOnly, <F1 as QueryData>::ReadOnly, <F2 as QueryData>::ReadOnly, <F3 as QueryData>::ReadOnly, <F4 as QueryData>::ReadOnly, <F5 as QueryData>::ReadOnly, <F6 as QueryData>::ReadOnly, <F7 as QueryData>::ReadOnly)

source§

impl<F0, F1, F2, F3, F4, F5, F6, F7, F8> QueryData for (F0, F1, F2, F3, F4, F5, F6, F7, F8)
where F0: QueryData, F1: QueryData, F2: QueryData, F3: QueryData, F4: QueryData, F5: QueryData, F6: QueryData, F7: QueryData, F8: QueryData,

§

type ReadOnly = (<F0 as QueryData>::ReadOnly, <F1 as QueryData>::ReadOnly, <F2 as QueryData>::ReadOnly, <F3 as QueryData>::ReadOnly, <F4 as QueryData>::ReadOnly, <F5 as QueryData>::ReadOnly, <F6 as QueryData>::ReadOnly, <F7 as QueryData>::ReadOnly, <F8 as QueryData>::ReadOnly)

source§

impl<F0, F1, F2, F3, F4, F5, F6, F7, F8, F9> QueryData for (F0, F1, F2, F3, F4, F5, F6, F7, F8, F9)
where F0: QueryData, F1: QueryData, F2: QueryData, F3: QueryData, F4: QueryData, F5: QueryData, F6: QueryData, F7: QueryData, F8: QueryData, F9: QueryData,

§

type ReadOnly = (<F0 as QueryData>::ReadOnly, <F1 as QueryData>::ReadOnly, <F2 as QueryData>::ReadOnly, <F3 as QueryData>::ReadOnly, <F4 as QueryData>::ReadOnly, <F5 as QueryData>::ReadOnly, <F6 as QueryData>::ReadOnly, <F7 as QueryData>::ReadOnly, <F8 as QueryData>::ReadOnly, <F9 as QueryData>::ReadOnly)

source§

impl<F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10> QueryData for (F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10)
where F0: QueryData, F1: QueryData, F2: QueryData, F3: QueryData, F4: QueryData, F5: QueryData, F6: QueryData, F7: QueryData, F8: QueryData, F9: QueryData, F10: QueryData,

§

type ReadOnly = (<F0 as QueryData>::ReadOnly, <F1 as QueryData>::ReadOnly, <F2 as QueryData>::ReadOnly, <F3 as QueryData>::ReadOnly, <F4 as QueryData>::ReadOnly, <F5 as QueryData>::ReadOnly, <F6 as QueryData>::ReadOnly, <F7 as QueryData>::ReadOnly, <F8 as QueryData>::ReadOnly, <F9 as QueryData>::ReadOnly, <F10 as QueryData>::ReadOnly)

source§

impl<F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11> QueryData for (F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11)
where F0: QueryData, F1: QueryData, F2: QueryData, F3: QueryData, F4: QueryData, F5: QueryData, F6: QueryData, F7: QueryData, F8: QueryData, F9: QueryData, F10: QueryData, F11: QueryData,

§

type ReadOnly = (<F0 as QueryData>::ReadOnly, <F1 as QueryData>::ReadOnly, <F2 as QueryData>::ReadOnly, <F3 as QueryData>::ReadOnly, <F4 as QueryData>::ReadOnly, <F5 as QueryData>::ReadOnly, <F6 as QueryData>::ReadOnly, <F7 as QueryData>::ReadOnly, <F8 as QueryData>::ReadOnly, <F9 as QueryData>::ReadOnly, <F10 as QueryData>::ReadOnly, <F11 as QueryData>::ReadOnly)

source§

impl<F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12> QueryData for (F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12)
where F0: QueryData, F1: QueryData, F2: QueryData, F3: QueryData, F4: QueryData, F5: QueryData, F6: QueryData, F7: QueryData, F8: QueryData, F9: QueryData, F10: QueryData, F11: QueryData, F12: QueryData,

§

type ReadOnly = (<F0 as QueryData>::ReadOnly, <F1 as QueryData>::ReadOnly, <F2 as QueryData>::ReadOnly, <F3 as QueryData>::ReadOnly, <F4 as QueryData>::ReadOnly, <F5 as QueryData>::ReadOnly, <F6 as QueryData>::ReadOnly, <F7 as QueryData>::ReadOnly, <F8 as QueryData>::ReadOnly, <F9 as QueryData>::ReadOnly, <F10 as QueryData>::ReadOnly, <F11 as QueryData>::ReadOnly, <F12 as QueryData>::ReadOnly)

source§

impl<F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13> QueryData for (F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13)
where F0: QueryData, F1: QueryData, F2: QueryData, F3: QueryData, F4: QueryData, F5: QueryData, F6: QueryData, F7: QueryData, F8: QueryData, F9: QueryData, F10: QueryData, F11: QueryData, F12: QueryData, F13: QueryData,

§

type ReadOnly = (<F0 as QueryData>::ReadOnly, <F1 as QueryData>::ReadOnly, <F2 as QueryData>::ReadOnly, <F3 as QueryData>::ReadOnly, <F4 as QueryData>::ReadOnly, <F5 as QueryData>::ReadOnly, <F6 as QueryData>::ReadOnly, <F7 as QueryData>::ReadOnly, <F8 as QueryData>::ReadOnly, <F9 as QueryData>::ReadOnly, <F10 as QueryData>::ReadOnly, <F11 as QueryData>::ReadOnly, <F12 as QueryData>::ReadOnly, <F13 as QueryData>::ReadOnly)

source§

impl<F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14> QueryData for (F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14)
where F0: QueryData, F1: QueryData, F2: QueryData, F3: QueryData, F4: QueryData, F5: QueryData, F6: QueryData, F7: QueryData, F8: QueryData, F9: QueryData, F10: QueryData, F11: QueryData, F12: QueryData, F13: QueryData, F14: QueryData,

§

type ReadOnly = (<F0 as QueryData>::ReadOnly, <F1 as QueryData>::ReadOnly, <F2 as QueryData>::ReadOnly, <F3 as QueryData>::ReadOnly, <F4 as QueryData>::ReadOnly, <F5 as QueryData>::ReadOnly, <F6 as QueryData>::ReadOnly, <F7 as QueryData>::ReadOnly, <F8 as QueryData>::ReadOnly, <F9 as QueryData>::ReadOnly, <F10 as QueryData>::ReadOnly, <F11 as QueryData>::ReadOnly, <F12 as QueryData>::ReadOnly, <F13 as QueryData>::ReadOnly, <F14 as QueryData>::ReadOnly)

source§

impl<T> QueryData for Option<T>
where T: QueryData,

source§

impl<T> QueryData for &T
where T: Component,

SAFETY: Self is the same as Self::ReadOnly

§

type ReadOnly = &T

source§

impl<T> QueryData for PhantomData<T>
where T: ?Sized,

SAFETY: Self::ReadOnly is Self

Implementors§

source§

impl QueryData for DebugName

SAFETY: we assert fields are readonly below

source§

impl QueryData for NodeQuery

SAFETY: we assert fields are readonly below

source§

impl QueryData for NodeQueryReadOnly

SAFETY: we assert fields are readonly below

source§

impl QueryData for AnyOf<()>

source§

impl QueryData for Entity

SAFETY: Self is the same as Self::ReadOnly

source§

impl<'__w, T> QueryData for Ref<'__w, T>
where T: Component,

SAFETY: Self is the same as Self::ReadOnly

§

type ReadOnly = Ref<'__w, T>

source§

impl<'a> QueryData for EntityMut<'a>

SAFETY: access of EntityRef is a subset of EntityMut

source§

impl<'a> QueryData for EntityRef<'a>

SAFETY: Self is the same as Self::ReadOnly

source§

impl<'a> QueryData for FilteredEntityMut<'a>

SAFETY: access of FilteredEntityRef is a subset of FilteredEntityMut

source§

impl<'a> QueryData for FilteredEntityRef<'a>

SAFETY: Self is the same as Self::ReadOnly

source§

impl<D> QueryData for NopWorldQuery<D>
where D: QueryData,

SAFETY: Self::ReadOnly is Self

source§

impl<F0> QueryData for AnyOf<(F0,)>
where F0: QueryData,

§

type ReadOnly = AnyOf<(<F0 as QueryData>::ReadOnly,)>

source§

impl<F0, F1> QueryData for AnyOf<(F0, F1)>
where F0: QueryData, F1: QueryData,

§

type ReadOnly = AnyOf<(<F0 as QueryData>::ReadOnly, <F1 as QueryData>::ReadOnly)>

source§

impl<F0, F1, F2> QueryData for AnyOf<(F0, F1, F2)>
where F0: QueryData, F1: QueryData, F2: QueryData,

§

type ReadOnly = AnyOf<(<F0 as QueryData>::ReadOnly, <F1 as QueryData>::ReadOnly, <F2 as QueryData>::ReadOnly)>

source§

impl<F0, F1, F2, F3> QueryData for AnyOf<(F0, F1, F2, F3)>
where F0: QueryData, F1: QueryData, F2: QueryData, F3: QueryData,

§

type ReadOnly = AnyOf<(<F0 as QueryData>::ReadOnly, <F1 as QueryData>::ReadOnly, <F2 as QueryData>::ReadOnly, <F3 as QueryData>::ReadOnly)>

source§

impl<F0, F1, F2, F3, F4> QueryData for AnyOf<(F0, F1, F2, F3, F4)>
where F0: QueryData, F1: QueryData, F2: QueryData, F3: QueryData, F4: QueryData,

§

type ReadOnly = AnyOf<(<F0 as QueryData>::ReadOnly, <F1 as QueryData>::ReadOnly, <F2 as QueryData>::ReadOnly, <F3 as QueryData>::ReadOnly, <F4 as QueryData>::ReadOnly)>

source§

impl<F0, F1, F2, F3, F4, F5> QueryData for AnyOf<(F0, F1, F2, F3, F4, F5)>
where F0: QueryData, F1: QueryData, F2: QueryData, F3: QueryData, F4: QueryData, F5: QueryData,

§

type ReadOnly = AnyOf<(<F0 as QueryData>::ReadOnly, <F1 as QueryData>::ReadOnly, <F2 as QueryData>::ReadOnly, <F3 as QueryData>::ReadOnly, <F4 as QueryData>::ReadOnly, <F5 as QueryData>::ReadOnly)>

source§

impl<F0, F1, F2, F3, F4, F5, F6> QueryData for AnyOf<(F0, F1, F2, F3, F4, F5, F6)>
where F0: QueryData, F1: QueryData, F2: QueryData, F3: QueryData, F4: QueryData, F5: QueryData, F6: QueryData,

§

type ReadOnly = AnyOf<(<F0 as QueryData>::ReadOnly, <F1 as QueryData>::ReadOnly, <F2 as QueryData>::ReadOnly, <F3 as QueryData>::ReadOnly, <F4 as QueryData>::ReadOnly, <F5 as QueryData>::ReadOnly, <F6 as QueryData>::ReadOnly)>

source§

impl<F0, F1, F2, F3, F4, F5, F6, F7> QueryData for AnyOf<(F0, F1, F2, F3, F4, F5, F6, F7)>
where F0: QueryData, F1: QueryData, F2: QueryData, F3: QueryData, F4: QueryData, F5: QueryData, F6: QueryData, F7: QueryData,

§

type ReadOnly = AnyOf<(<F0 as QueryData>::ReadOnly, <F1 as QueryData>::ReadOnly, <F2 as QueryData>::ReadOnly, <F3 as QueryData>::ReadOnly, <F4 as QueryData>::ReadOnly, <F5 as QueryData>::ReadOnly, <F6 as QueryData>::ReadOnly, <F7 as QueryData>::ReadOnly)>

source§

impl<F0, F1, F2, F3, F4, F5, F6, F7, F8> QueryData for AnyOf<(F0, F1, F2, F3, F4, F5, F6, F7, F8)>
where F0: QueryData, F1: QueryData, F2: QueryData, F3: QueryData, F4: QueryData, F5: QueryData, F6: QueryData, F7: QueryData, F8: QueryData,

§

type ReadOnly = AnyOf<(<F0 as QueryData>::ReadOnly, <F1 as QueryData>::ReadOnly, <F2 as QueryData>::ReadOnly, <F3 as QueryData>::ReadOnly, <F4 as QueryData>::ReadOnly, <F5 as QueryData>::ReadOnly, <F6 as QueryData>::ReadOnly, <F7 as QueryData>::ReadOnly, <F8 as QueryData>::ReadOnly)>

source§

impl<F0, F1, F2, F3, F4, F5, F6, F7, F8, F9> QueryData for AnyOf<(F0, F1, F2, F3, F4, F5, F6, F7, F8, F9)>
where F0: QueryData, F1: QueryData, F2: QueryData, F3: QueryData, F4: QueryData, F5: QueryData, F6: QueryData, F7: QueryData, F8: QueryData, F9: QueryData,

§

type ReadOnly = AnyOf<(<F0 as QueryData>::ReadOnly, <F1 as QueryData>::ReadOnly, <F2 as QueryData>::ReadOnly, <F3 as QueryData>::ReadOnly, <F4 as QueryData>::ReadOnly, <F5 as QueryData>::ReadOnly, <F6 as QueryData>::ReadOnly, <F7 as QueryData>::ReadOnly, <F8 as QueryData>::ReadOnly, <F9 as QueryData>::ReadOnly)>

source§

impl<F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10> QueryData for AnyOf<(F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10)>
where F0: QueryData, F1: QueryData, F2: QueryData, F3: QueryData, F4: QueryData, F5: QueryData, F6: QueryData, F7: QueryData, F8: QueryData, F9: QueryData, F10: QueryData,

§

type ReadOnly = AnyOf<(<F0 as QueryData>::ReadOnly, <F1 as QueryData>::ReadOnly, <F2 as QueryData>::ReadOnly, <F3 as QueryData>::ReadOnly, <F4 as QueryData>::ReadOnly, <F5 as QueryData>::ReadOnly, <F6 as QueryData>::ReadOnly, <F7 as QueryData>::ReadOnly, <F8 as QueryData>::ReadOnly, <F9 as QueryData>::ReadOnly, <F10 as QueryData>::ReadOnly)>

source§

impl<F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11> QueryData for AnyOf<(F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11)>
where F0: QueryData, F1: QueryData, F2: QueryData, F3: QueryData, F4: QueryData, F5: QueryData, F6: QueryData, F7: QueryData, F8: QueryData, F9: QueryData, F10: QueryData, F11: QueryData,

§

type ReadOnly = AnyOf<(<F0 as QueryData>::ReadOnly, <F1 as QueryData>::ReadOnly, <F2 as QueryData>::ReadOnly, <F3 as QueryData>::ReadOnly, <F4 as QueryData>::ReadOnly, <F5 as QueryData>::ReadOnly, <F6 as QueryData>::ReadOnly, <F7 as QueryData>::ReadOnly, <F8 as QueryData>::ReadOnly, <F9 as QueryData>::ReadOnly, <F10 as QueryData>::ReadOnly, <F11 as QueryData>::ReadOnly)>

source§

impl<F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12> QueryData for AnyOf<(F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12)>
where F0: QueryData, F1: QueryData, F2: QueryData, F3: QueryData, F4: QueryData, F5: QueryData, F6: QueryData, F7: QueryData, F8: QueryData, F9: QueryData, F10: QueryData, F11: QueryData, F12: QueryData,

§

type ReadOnly = AnyOf<(<F0 as QueryData>::ReadOnly, <F1 as QueryData>::ReadOnly, <F2 as QueryData>::ReadOnly, <F3 as QueryData>::ReadOnly, <F4 as QueryData>::ReadOnly, <F5 as QueryData>::ReadOnly, <F6 as QueryData>::ReadOnly, <F7 as QueryData>::ReadOnly, <F8 as QueryData>::ReadOnly, <F9 as QueryData>::ReadOnly, <F10 as QueryData>::ReadOnly, <F11 as QueryData>::ReadOnly, <F12 as QueryData>::ReadOnly)>

source§

impl<F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13> QueryData for AnyOf<(F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13)>
where F0: QueryData, F1: QueryData, F2: QueryData, F3: QueryData, F4: QueryData, F5: QueryData, F6: QueryData, F7: QueryData, F8: QueryData, F9: QueryData, F10: QueryData, F11: QueryData, F12: QueryData, F13: QueryData,

§

type ReadOnly = AnyOf<(<F0 as QueryData>::ReadOnly, <F1 as QueryData>::ReadOnly, <F2 as QueryData>::ReadOnly, <F3 as QueryData>::ReadOnly, <F4 as QueryData>::ReadOnly, <F5 as QueryData>::ReadOnly, <F6 as QueryData>::ReadOnly, <F7 as QueryData>::ReadOnly, <F8 as QueryData>::ReadOnly, <F9 as QueryData>::ReadOnly, <F10 as QueryData>::ReadOnly, <F11 as QueryData>::ReadOnly, <F12 as QueryData>::ReadOnly, <F13 as QueryData>::ReadOnly)>

source§

impl<F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14> QueryData for AnyOf<(F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14)>
where F0: QueryData, F1: QueryData, F2: QueryData, F3: QueryData, F4: QueryData, F5: QueryData, F6: QueryData, F7: QueryData, F8: QueryData, F9: QueryData, F10: QueryData, F11: QueryData, F12: QueryData, F13: QueryData, F14: QueryData,

§

type ReadOnly = AnyOf<(<F0 as QueryData>::ReadOnly, <F1 as QueryData>::ReadOnly, <F2 as QueryData>::ReadOnly, <F3 as QueryData>::ReadOnly, <F4 as QueryData>::ReadOnly, <F5 as QueryData>::ReadOnly, <F6 as QueryData>::ReadOnly, <F7 as QueryData>::ReadOnly, <F8 as QueryData>::ReadOnly, <F9 as QueryData>::ReadOnly, <F10 as QueryData>::ReadOnly, <F11 as QueryData>::ReadOnly, <F12 as QueryData>::ReadOnly, <F13 as QueryData>::ReadOnly, <F14 as QueryData>::ReadOnly)>

source§

impl<T> QueryData for Has<T>
where T: Component,

SAFETY: Self is the same as Self::ReadOnly

§

type ReadOnly = Has<T>