pub struct Or<T>(pub T);
Expand description
A filter that tests if any of the given filters apply.
This is useful for example if a system with multiple components in a query only wants to run when one or more of the components have changed.
The And
equivalent to this filter is a tuple
testing that all the contained filters
apply instead.
Examples
fn print_cool_entity_system(query: Query<Entity, Or<(Changed<Color>, Changed<Style>)>>) {
for entity in &query {
println!("Entity {:?} got a new style or color", entity);
}
}
Tuple Fields§
§0: T
Trait Implementations§
source§impl WorldQuery for Or<()>
impl WorldQuery for Or<()>
§type Fetch<'w> = ()
type Fetch<'w> = ()
Per archetype/table state used by this
WorldQuery
to fetch Self::Item
§type Item<'w> = bool
type Item<'w> = bool
The item returned by this
WorldQuery
§type ReadOnly = Or<()>
type ReadOnly = Or<()>
The read-only variant of this
WorldQuery
, which satisfies the ReadOnlyWorldQuery
trait.§type State = ()
type State = ()
State used to construct a
Self::Fetch
. This will be cached inside QueryState
,
so it is best to move as much data / computation here as possible to reduce the cost of
constructing Self::Fetch
. Read moresource§fn shrink<'wlong: 'wshort, 'wshort>(
item: Self::Item<'wlong>
) -> Self::Item<'wshort>
fn shrink<'wlong: 'wshort, 'wshort>(
item: Self::Item<'wlong>
) -> Self::Item<'wshort>
This function manually implements subtyping for the query items.
source§const IS_DENSE: bool = true
const IS_DENSE: bool = true
Returns true if (and only if) every table of every archetype matched by this fetch contains
all of the matched components. This is used to select a more efficient “table iterator”
for “dense” queries. If this returns true,
WorldQuery::set_table
must be used before
WorldQuery::fetch
can be called for iterators. If this returns false,
WorldQuery::set_archetype
must be used before WorldQuery::fetch
can be called for
iterators. Read moresource§const IS_ARCHETYPAL: bool = true
const IS_ARCHETYPAL: bool = true
Returns true if (and only if) this Fetch relies strictly on archetypes to limit which
components are accessed by the Query. Read more
source§unsafe fn init_fetch<'w>(
world: &'w World,
state: &Self::State,
last_change_tick: u32,
change_tick: u32
) -> Self::Fetch<'w>
unsafe fn init_fetch<'w>(
world: &'w World,
state: &Self::State,
last_change_tick: u32,
change_tick: u32
) -> Self::Fetch<'w>
Creates a new instance of this fetch. Read more
source§unsafe fn clone_fetch<'w>(fetch: &Self::Fetch<'w>) -> Self::Fetch<'w>
unsafe fn clone_fetch<'w>(fetch: &Self::Fetch<'w>) -> Self::Fetch<'w>
While this function can be called for any query, it is always safe to call if
Self: ReadOnlyWorldQuery
holds. Read moresource§unsafe fn set_table<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
table: &'w Table
)
unsafe fn set_table<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
table: &'w Table
)
Adjusts internal state to account for the next
Table
. This will always be called on tables
that match this WorldQuery
. Read moresource§unsafe fn set_archetype<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
archetype: &'w Archetype,
table: &'w Table
)
unsafe fn set_archetype<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
archetype: &'w Archetype,
table: &'w Table
)
Adjusts internal state to account for the next
Archetype
. This will always be called on
archetypes that match this WorldQuery
. Read moresource§unsafe fn fetch<'w>(
fetch: &mut Self::Fetch<'w>,
_entity: Entity,
_table_row: usize
) -> Self::Item<'w>
unsafe fn fetch<'w>(
fetch: &mut Self::Fetch<'w>,
_entity: Entity,
_table_row: usize
) -> Self::Item<'w>
Fetch
Self::Item
for either the given entity
in the current Table
,
or for the given entity
in the current Archetype
. This must always be called after
WorldQuery::set_table
with a table_row
in the range of the current Table
or after
WorldQuery::set_archetype
with a entity
in the current archetype. Read moresource§unsafe fn filter_fetch<'w>(
fetch: &mut Self::Fetch<'w>,
entity: Entity,
table_row: usize
) -> bool
unsafe fn filter_fetch<'w>(
fetch: &mut Self::Fetch<'w>,
entity: Entity,
table_row: usize
) -> bool
Safety Read more
fn update_component_access(
state: &Self::State,
access: &mut FilteredAccess<ComponentId>
)
fn update_archetype_component_access(
state: &Self::State,
archetype: &Archetype,
access: &mut Access<ArchetypeComponentId>
)
fn init_state(world: &mut World) -> Self::State
fn matches_component_set(
_state: &Self::State,
_set_contains_id: &impl Fn(ComponentId) -> bool
) -> bool
source§impl<F0: WorldQuery, F1: WorldQuery, F2: WorldQuery, F3: WorldQuery, F4: WorldQuery, F5: WorldQuery, F6: WorldQuery, F7: WorldQuery, F8: WorldQuery, F9: WorldQuery, F10: WorldQuery, F11: WorldQuery, F12: WorldQuery, F13: WorldQuery, F14: WorldQuery> WorldQuery for Or<(F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14)>
impl<F0: WorldQuery, F1: WorldQuery, F2: WorldQuery, F3: WorldQuery, F4: WorldQuery, F5: WorldQuery, F6: WorldQuery, F7: WorldQuery, F8: WorldQuery, F9: WorldQuery, F10: WorldQuery, F11: WorldQuery, F12: WorldQuery, F13: WorldQuery, F14: WorldQuery> WorldQuery for Or<(F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14)>
§type Fetch<'w> = (OrFetch<'w, F0>, OrFetch<'w, F1>, OrFetch<'w, F2>, OrFetch<'w, F3>, OrFetch<'w, F4>, OrFetch<'w, F5>, OrFetch<'w, F6>, OrFetch<'w, F7>, OrFetch<'w, F8>, OrFetch<'w, F9>, OrFetch<'w, F10>, OrFetch<'w, F11>, OrFetch<'w, F12>, OrFetch<'w, F13>, OrFetch<'w, F14>)
type Fetch<'w> = (OrFetch<'w, F0>, OrFetch<'w, F1>, OrFetch<'w, F2>, OrFetch<'w, F3>, OrFetch<'w, F4>, OrFetch<'w, F5>, OrFetch<'w, F6>, OrFetch<'w, F7>, OrFetch<'w, F8>, OrFetch<'w, F9>, OrFetch<'w, F10>, OrFetch<'w, F11>, OrFetch<'w, F12>, OrFetch<'w, F13>, OrFetch<'w, F14>)
Per archetype/table state used by this
WorldQuery
to fetch Self::Item
§type Item<'w> = bool
type Item<'w> = bool
The item returned by this
WorldQuery
§type ReadOnly = Or<(<F0 as WorldQuery>::ReadOnly, <F1 as WorldQuery>::ReadOnly, <F2 as WorldQuery>::ReadOnly, <F3 as WorldQuery>::ReadOnly, <F4 as WorldQuery>::ReadOnly, <F5 as WorldQuery>::ReadOnly, <F6 as WorldQuery>::ReadOnly, <F7 as WorldQuery>::ReadOnly, <F8 as WorldQuery>::ReadOnly, <F9 as WorldQuery>::ReadOnly, <F10 as WorldQuery>::ReadOnly, <F11 as WorldQuery>::ReadOnly, <F12 as WorldQuery>::ReadOnly, <F13 as WorldQuery>::ReadOnly, <F14 as WorldQuery>::ReadOnly)>
type ReadOnly = Or<(<F0 as WorldQuery>::ReadOnly, <F1 as WorldQuery>::ReadOnly, <F2 as WorldQuery>::ReadOnly, <F3 as WorldQuery>::ReadOnly, <F4 as WorldQuery>::ReadOnly, <F5 as WorldQuery>::ReadOnly, <F6 as WorldQuery>::ReadOnly, <F7 as WorldQuery>::ReadOnly, <F8 as WorldQuery>::ReadOnly, <F9 as WorldQuery>::ReadOnly, <F10 as WorldQuery>::ReadOnly, <F11 as WorldQuery>::ReadOnly, <F12 as WorldQuery>::ReadOnly, <F13 as WorldQuery>::ReadOnly, <F14 as WorldQuery>::ReadOnly)>
The read-only variant of this
WorldQuery
, which satisfies the ReadOnlyWorldQuery
trait.§type State = (<F0 as WorldQuery>::State, <F1 as WorldQuery>::State, <F2 as WorldQuery>::State, <F3 as WorldQuery>::State, <F4 as WorldQuery>::State, <F5 as WorldQuery>::State, <F6 as WorldQuery>::State, <F7 as WorldQuery>::State, <F8 as WorldQuery>::State, <F9 as WorldQuery>::State, <F10 as WorldQuery>::State, <F11 as WorldQuery>::State, <F12 as WorldQuery>::State, <F13 as WorldQuery>::State, <F14 as WorldQuery>::State)
type State = (<F0 as WorldQuery>::State, <F1 as WorldQuery>::State, <F2 as WorldQuery>::State, <F3 as WorldQuery>::State, <F4 as WorldQuery>::State, <F5 as WorldQuery>::State, <F6 as WorldQuery>::State, <F7 as WorldQuery>::State, <F8 as WorldQuery>::State, <F9 as WorldQuery>::State, <F10 as WorldQuery>::State, <F11 as WorldQuery>::State, <F12 as WorldQuery>::State, <F13 as WorldQuery>::State, <F14 as WorldQuery>::State)
State used to construct a
Self::Fetch
. This will be cached inside QueryState
,
so it is best to move as much data / computation here as possible to reduce the cost of
constructing Self::Fetch
. Read moresource§fn shrink<'wlong: 'wshort, 'wshort>(
item: Self::Item<'wlong>
) -> Self::Item<'wshort>
fn shrink<'wlong: 'wshort, 'wshort>(
item: Self::Item<'wlong>
) -> Self::Item<'wshort>
This function manually implements subtyping for the query items.
source§const IS_DENSE: bool = _
const IS_DENSE: bool = _
Returns true if (and only if) every table of every archetype matched by this fetch contains
all of the matched components. This is used to select a more efficient “table iterator”
for “dense” queries. If this returns true,
WorldQuery::set_table
must be used before
WorldQuery::fetch
can be called for iterators. If this returns false,
WorldQuery::set_archetype
must be used before WorldQuery::fetch
can be called for
iterators. Read moresource§const IS_ARCHETYPAL: bool = _
const IS_ARCHETYPAL: bool = _
Returns true if (and only if) this Fetch relies strictly on archetypes to limit which
components are accessed by the Query. Read more
source§unsafe fn init_fetch<'w>(
world: &'w World,
state: &Self::State,
last_change_tick: u32,
change_tick: u32
) -> Self::Fetch<'w>
unsafe fn init_fetch<'w>(
world: &'w World,
state: &Self::State,
last_change_tick: u32,
change_tick: u32
) -> Self::Fetch<'w>
Creates a new instance of this fetch. Read more
source§unsafe fn clone_fetch<'w>(fetch: &Self::Fetch<'w>) -> Self::Fetch<'w>
unsafe fn clone_fetch<'w>(fetch: &Self::Fetch<'w>) -> Self::Fetch<'w>
While this function can be called for any query, it is always safe to call if
Self: ReadOnlyWorldQuery
holds. Read moresource§unsafe fn set_table<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
table: &'w Table
)
unsafe fn set_table<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
table: &'w Table
)
Adjusts internal state to account for the next
Table
. This will always be called on tables
that match this WorldQuery
. Read moresource§unsafe fn set_archetype<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
archetype: &'w Archetype,
table: &'w Table
)
unsafe fn set_archetype<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
archetype: &'w Archetype,
table: &'w Table
)
Adjusts internal state to account for the next
Archetype
. This will always be called on
archetypes that match this WorldQuery
. Read moresource§unsafe fn fetch<'w>(
fetch: &mut Self::Fetch<'w>,
_entity: Entity,
_table_row: usize
) -> Self::Item<'w>
unsafe fn fetch<'w>(
fetch: &mut Self::Fetch<'w>,
_entity: Entity,
_table_row: usize
) -> Self::Item<'w>
Fetch
Self::Item
for either the given entity
in the current Table
,
or for the given entity
in the current Archetype
. This must always be called after
WorldQuery::set_table
with a table_row
in the range of the current Table
or after
WorldQuery::set_archetype
with a entity
in the current archetype. Read moresource§unsafe fn filter_fetch<'w>(
fetch: &mut Self::Fetch<'w>,
entity: Entity,
table_row: usize
) -> bool
unsafe fn filter_fetch<'w>(
fetch: &mut Self::Fetch<'w>,
entity: Entity,
table_row: usize
) -> bool
Safety Read more
fn update_component_access(
state: &Self::State,
access: &mut FilteredAccess<ComponentId>
)
fn update_archetype_component_access(
state: &Self::State,
archetype: &Archetype,
access: &mut Access<ArchetypeComponentId>
)
fn init_state(world: &mut World) -> Self::State
fn matches_component_set(
_state: &Self::State,
_set_contains_id: &impl Fn(ComponentId) -> bool
) -> bool
source§impl<F0: WorldQuery, F1: WorldQuery, F2: WorldQuery, F3: WorldQuery, F4: WorldQuery, F5: WorldQuery, F6: WorldQuery, F7: WorldQuery, F8: WorldQuery, F9: WorldQuery, F10: WorldQuery, F11: WorldQuery, F12: WorldQuery, F13: WorldQuery> WorldQuery for Or<(F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13)>
impl<F0: WorldQuery, F1: WorldQuery, F2: WorldQuery, F3: WorldQuery, F4: WorldQuery, F5: WorldQuery, F6: WorldQuery, F7: WorldQuery, F8: WorldQuery, F9: WorldQuery, F10: WorldQuery, F11: WorldQuery, F12: WorldQuery, F13: WorldQuery> WorldQuery for Or<(F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13)>
§type Fetch<'w> = (OrFetch<'w, F0>, OrFetch<'w, F1>, OrFetch<'w, F2>, OrFetch<'w, F3>, OrFetch<'w, F4>, OrFetch<'w, F5>, OrFetch<'w, F6>, OrFetch<'w, F7>, OrFetch<'w, F8>, OrFetch<'w, F9>, OrFetch<'w, F10>, OrFetch<'w, F11>, OrFetch<'w, F12>, OrFetch<'w, F13>)
type Fetch<'w> = (OrFetch<'w, F0>, OrFetch<'w, F1>, OrFetch<'w, F2>, OrFetch<'w, F3>, OrFetch<'w, F4>, OrFetch<'w, F5>, OrFetch<'w, F6>, OrFetch<'w, F7>, OrFetch<'w, F8>, OrFetch<'w, F9>, OrFetch<'w, F10>, OrFetch<'w, F11>, OrFetch<'w, F12>, OrFetch<'w, F13>)
Per archetype/table state used by this
WorldQuery
to fetch Self::Item
§type Item<'w> = bool
type Item<'w> = bool
The item returned by this
WorldQuery
§type ReadOnly = Or<(<F0 as WorldQuery>::ReadOnly, <F1 as WorldQuery>::ReadOnly, <F2 as WorldQuery>::ReadOnly, <F3 as WorldQuery>::ReadOnly, <F4 as WorldQuery>::ReadOnly, <F5 as WorldQuery>::ReadOnly, <F6 as WorldQuery>::ReadOnly, <F7 as WorldQuery>::ReadOnly, <F8 as WorldQuery>::ReadOnly, <F9 as WorldQuery>::ReadOnly, <F10 as WorldQuery>::ReadOnly, <F11 as WorldQuery>::ReadOnly, <F12 as WorldQuery>::ReadOnly, <F13 as WorldQuery>::ReadOnly)>
type ReadOnly = Or<(<F0 as WorldQuery>::ReadOnly, <F1 as WorldQuery>::ReadOnly, <F2 as WorldQuery>::ReadOnly, <F3 as WorldQuery>::ReadOnly, <F4 as WorldQuery>::ReadOnly, <F5 as WorldQuery>::ReadOnly, <F6 as WorldQuery>::ReadOnly, <F7 as WorldQuery>::ReadOnly, <F8 as WorldQuery>::ReadOnly, <F9 as WorldQuery>::ReadOnly, <F10 as WorldQuery>::ReadOnly, <F11 as WorldQuery>::ReadOnly, <F12 as WorldQuery>::ReadOnly, <F13 as WorldQuery>::ReadOnly)>
The read-only variant of this
WorldQuery
, which satisfies the ReadOnlyWorldQuery
trait.§type State = (<F0 as WorldQuery>::State, <F1 as WorldQuery>::State, <F2 as WorldQuery>::State, <F3 as WorldQuery>::State, <F4 as WorldQuery>::State, <F5 as WorldQuery>::State, <F6 as WorldQuery>::State, <F7 as WorldQuery>::State, <F8 as WorldQuery>::State, <F9 as WorldQuery>::State, <F10 as WorldQuery>::State, <F11 as WorldQuery>::State, <F12 as WorldQuery>::State, <F13 as WorldQuery>::State)
type State = (<F0 as WorldQuery>::State, <F1 as WorldQuery>::State, <F2 as WorldQuery>::State, <F3 as WorldQuery>::State, <F4 as WorldQuery>::State, <F5 as WorldQuery>::State, <F6 as WorldQuery>::State, <F7 as WorldQuery>::State, <F8 as WorldQuery>::State, <F9 as WorldQuery>::State, <F10 as WorldQuery>::State, <F11 as WorldQuery>::State, <F12 as WorldQuery>::State, <F13 as WorldQuery>::State)
State used to construct a
Self::Fetch
. This will be cached inside QueryState
,
so it is best to move as much data / computation here as possible to reduce the cost of
constructing Self::Fetch
. Read moresource§fn shrink<'wlong: 'wshort, 'wshort>(
item: Self::Item<'wlong>
) -> Self::Item<'wshort>
fn shrink<'wlong: 'wshort, 'wshort>(
item: Self::Item<'wlong>
) -> Self::Item<'wshort>
This function manually implements subtyping for the query items.
source§const IS_DENSE: bool = _
const IS_DENSE: bool = _
Returns true if (and only if) every table of every archetype matched by this fetch contains
all of the matched components. This is used to select a more efficient “table iterator”
for “dense” queries. If this returns true,
WorldQuery::set_table
must be used before
WorldQuery::fetch
can be called for iterators. If this returns false,
WorldQuery::set_archetype
must be used before WorldQuery::fetch
can be called for
iterators. Read moresource§const IS_ARCHETYPAL: bool = _
const IS_ARCHETYPAL: bool = _
Returns true if (and only if) this Fetch relies strictly on archetypes to limit which
components are accessed by the Query. Read more
source§unsafe fn init_fetch<'w>(
world: &'w World,
state: &Self::State,
last_change_tick: u32,
change_tick: u32
) -> Self::Fetch<'w>
unsafe fn init_fetch<'w>(
world: &'w World,
state: &Self::State,
last_change_tick: u32,
change_tick: u32
) -> Self::Fetch<'w>
Creates a new instance of this fetch. Read more
source§unsafe fn clone_fetch<'w>(fetch: &Self::Fetch<'w>) -> Self::Fetch<'w>
unsafe fn clone_fetch<'w>(fetch: &Self::Fetch<'w>) -> Self::Fetch<'w>
While this function can be called for any query, it is always safe to call if
Self: ReadOnlyWorldQuery
holds. Read moresource§unsafe fn set_table<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
table: &'w Table
)
unsafe fn set_table<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
table: &'w Table
)
Adjusts internal state to account for the next
Table
. This will always be called on tables
that match this WorldQuery
. Read moresource§unsafe fn set_archetype<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
archetype: &'w Archetype,
table: &'w Table
)
unsafe fn set_archetype<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
archetype: &'w Archetype,
table: &'w Table
)
Adjusts internal state to account for the next
Archetype
. This will always be called on
archetypes that match this WorldQuery
. Read moresource§unsafe fn fetch<'w>(
fetch: &mut Self::Fetch<'w>,
_entity: Entity,
_table_row: usize
) -> Self::Item<'w>
unsafe fn fetch<'w>(
fetch: &mut Self::Fetch<'w>,
_entity: Entity,
_table_row: usize
) -> Self::Item<'w>
Fetch
Self::Item
for either the given entity
in the current Table
,
or for the given entity
in the current Archetype
. This must always be called after
WorldQuery::set_table
with a table_row
in the range of the current Table
or after
WorldQuery::set_archetype
with a entity
in the current archetype. Read moresource§unsafe fn filter_fetch<'w>(
fetch: &mut Self::Fetch<'w>,
entity: Entity,
table_row: usize
) -> bool
unsafe fn filter_fetch<'w>(
fetch: &mut Self::Fetch<'w>,
entity: Entity,
table_row: usize
) -> bool
Safety Read more
fn update_component_access(
state: &Self::State,
access: &mut FilteredAccess<ComponentId>
)
fn update_archetype_component_access(
state: &Self::State,
archetype: &Archetype,
access: &mut Access<ArchetypeComponentId>
)
fn init_state(world: &mut World) -> Self::State
fn matches_component_set(
_state: &Self::State,
_set_contains_id: &impl Fn(ComponentId) -> bool
) -> bool
source§impl<F0: WorldQuery, F1: WorldQuery, F2: WorldQuery, F3: WorldQuery, F4: WorldQuery, F5: WorldQuery, F6: WorldQuery, F7: WorldQuery, F8: WorldQuery, F9: WorldQuery, F10: WorldQuery, F11: WorldQuery, F12: WorldQuery> WorldQuery for Or<(F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12)>
impl<F0: WorldQuery, F1: WorldQuery, F2: WorldQuery, F3: WorldQuery, F4: WorldQuery, F5: WorldQuery, F6: WorldQuery, F7: WorldQuery, F8: WorldQuery, F9: WorldQuery, F10: WorldQuery, F11: WorldQuery, F12: WorldQuery> WorldQuery for Or<(F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12)>
§type Fetch<'w> = (OrFetch<'w, F0>, OrFetch<'w, F1>, OrFetch<'w, F2>, OrFetch<'w, F3>, OrFetch<'w, F4>, OrFetch<'w, F5>, OrFetch<'w, F6>, OrFetch<'w, F7>, OrFetch<'w, F8>, OrFetch<'w, F9>, OrFetch<'w, F10>, OrFetch<'w, F11>, OrFetch<'w, F12>)
type Fetch<'w> = (OrFetch<'w, F0>, OrFetch<'w, F1>, OrFetch<'w, F2>, OrFetch<'w, F3>, OrFetch<'w, F4>, OrFetch<'w, F5>, OrFetch<'w, F6>, OrFetch<'w, F7>, OrFetch<'w, F8>, OrFetch<'w, F9>, OrFetch<'w, F10>, OrFetch<'w, F11>, OrFetch<'w, F12>)
Per archetype/table state used by this
WorldQuery
to fetch Self::Item
§type Item<'w> = bool
type Item<'w> = bool
The item returned by this
WorldQuery
§type ReadOnly = Or<(<F0 as WorldQuery>::ReadOnly, <F1 as WorldQuery>::ReadOnly, <F2 as WorldQuery>::ReadOnly, <F3 as WorldQuery>::ReadOnly, <F4 as WorldQuery>::ReadOnly, <F5 as WorldQuery>::ReadOnly, <F6 as WorldQuery>::ReadOnly, <F7 as WorldQuery>::ReadOnly, <F8 as WorldQuery>::ReadOnly, <F9 as WorldQuery>::ReadOnly, <F10 as WorldQuery>::ReadOnly, <F11 as WorldQuery>::ReadOnly, <F12 as WorldQuery>::ReadOnly)>
type ReadOnly = Or<(<F0 as WorldQuery>::ReadOnly, <F1 as WorldQuery>::ReadOnly, <F2 as WorldQuery>::ReadOnly, <F3 as WorldQuery>::ReadOnly, <F4 as WorldQuery>::ReadOnly, <F5 as WorldQuery>::ReadOnly, <F6 as WorldQuery>::ReadOnly, <F7 as WorldQuery>::ReadOnly, <F8 as WorldQuery>::ReadOnly, <F9 as WorldQuery>::ReadOnly, <F10 as WorldQuery>::ReadOnly, <F11 as WorldQuery>::ReadOnly, <F12 as WorldQuery>::ReadOnly)>
The read-only variant of this
WorldQuery
, which satisfies the ReadOnlyWorldQuery
trait.§type State = (<F0 as WorldQuery>::State, <F1 as WorldQuery>::State, <F2 as WorldQuery>::State, <F3 as WorldQuery>::State, <F4 as WorldQuery>::State, <F5 as WorldQuery>::State, <F6 as WorldQuery>::State, <F7 as WorldQuery>::State, <F8 as WorldQuery>::State, <F9 as WorldQuery>::State, <F10 as WorldQuery>::State, <F11 as WorldQuery>::State, <F12 as WorldQuery>::State)
type State = (<F0 as WorldQuery>::State, <F1 as WorldQuery>::State, <F2 as WorldQuery>::State, <F3 as WorldQuery>::State, <F4 as WorldQuery>::State, <F5 as WorldQuery>::State, <F6 as WorldQuery>::State, <F7 as WorldQuery>::State, <F8 as WorldQuery>::State, <F9 as WorldQuery>::State, <F10 as WorldQuery>::State, <F11 as WorldQuery>::State, <F12 as WorldQuery>::State)
State used to construct a
Self::Fetch
. This will be cached inside QueryState
,
so it is best to move as much data / computation here as possible to reduce the cost of
constructing Self::Fetch
. Read moresource§fn shrink<'wlong: 'wshort, 'wshort>(
item: Self::Item<'wlong>
) -> Self::Item<'wshort>
fn shrink<'wlong: 'wshort, 'wshort>(
item: Self::Item<'wlong>
) -> Self::Item<'wshort>
This function manually implements subtyping for the query items.
source§const IS_DENSE: bool = _
const IS_DENSE: bool = _
Returns true if (and only if) every table of every archetype matched by this fetch contains
all of the matched components. This is used to select a more efficient “table iterator”
for “dense” queries. If this returns true,
WorldQuery::set_table
must be used before
WorldQuery::fetch
can be called for iterators. If this returns false,
WorldQuery::set_archetype
must be used before WorldQuery::fetch
can be called for
iterators. Read moresource§const IS_ARCHETYPAL: bool = _
const IS_ARCHETYPAL: bool = _
Returns true if (and only if) this Fetch relies strictly on archetypes to limit which
components are accessed by the Query. Read more
source§unsafe fn init_fetch<'w>(
world: &'w World,
state: &Self::State,
last_change_tick: u32,
change_tick: u32
) -> Self::Fetch<'w>
unsafe fn init_fetch<'w>(
world: &'w World,
state: &Self::State,
last_change_tick: u32,
change_tick: u32
) -> Self::Fetch<'w>
Creates a new instance of this fetch. Read more
source§unsafe fn clone_fetch<'w>(fetch: &Self::Fetch<'w>) -> Self::Fetch<'w>
unsafe fn clone_fetch<'w>(fetch: &Self::Fetch<'w>) -> Self::Fetch<'w>
While this function can be called for any query, it is always safe to call if
Self: ReadOnlyWorldQuery
holds. Read moresource§unsafe fn set_table<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
table: &'w Table
)
unsafe fn set_table<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
table: &'w Table
)
Adjusts internal state to account for the next
Table
. This will always be called on tables
that match this WorldQuery
. Read moresource§unsafe fn set_archetype<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
archetype: &'w Archetype,
table: &'w Table
)
unsafe fn set_archetype<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
archetype: &'w Archetype,
table: &'w Table
)
Adjusts internal state to account for the next
Archetype
. This will always be called on
archetypes that match this WorldQuery
. Read moresource§unsafe fn fetch<'w>(
fetch: &mut Self::Fetch<'w>,
_entity: Entity,
_table_row: usize
) -> Self::Item<'w>
unsafe fn fetch<'w>(
fetch: &mut Self::Fetch<'w>,
_entity: Entity,
_table_row: usize
) -> Self::Item<'w>
Fetch
Self::Item
for either the given entity
in the current Table
,
or for the given entity
in the current Archetype
. This must always be called after
WorldQuery::set_table
with a table_row
in the range of the current Table
or after
WorldQuery::set_archetype
with a entity
in the current archetype. Read moresource§unsafe fn filter_fetch<'w>(
fetch: &mut Self::Fetch<'w>,
entity: Entity,
table_row: usize
) -> bool
unsafe fn filter_fetch<'w>(
fetch: &mut Self::Fetch<'w>,
entity: Entity,
table_row: usize
) -> bool
Safety Read more
fn update_component_access(
state: &Self::State,
access: &mut FilteredAccess<ComponentId>
)
fn update_archetype_component_access(
state: &Self::State,
archetype: &Archetype,
access: &mut Access<ArchetypeComponentId>
)
fn init_state(world: &mut World) -> Self::State
fn matches_component_set(
_state: &Self::State,
_set_contains_id: &impl Fn(ComponentId) -> bool
) -> bool
source§impl<F0: WorldQuery, F1: WorldQuery, F2: WorldQuery, F3: WorldQuery, F4: WorldQuery, F5: WorldQuery, F6: WorldQuery, F7: WorldQuery, F8: WorldQuery, F9: WorldQuery, F10: WorldQuery, F11: WorldQuery> WorldQuery for Or<(F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11)>
impl<F0: WorldQuery, F1: WorldQuery, F2: WorldQuery, F3: WorldQuery, F4: WorldQuery, F5: WorldQuery, F6: WorldQuery, F7: WorldQuery, F8: WorldQuery, F9: WorldQuery, F10: WorldQuery, F11: WorldQuery> WorldQuery for Or<(F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11)>
§type Fetch<'w> = (OrFetch<'w, F0>, OrFetch<'w, F1>, OrFetch<'w, F2>, OrFetch<'w, F3>, OrFetch<'w, F4>, OrFetch<'w, F5>, OrFetch<'w, F6>, OrFetch<'w, F7>, OrFetch<'w, F8>, OrFetch<'w, F9>, OrFetch<'w, F10>, OrFetch<'w, F11>)
type Fetch<'w> = (OrFetch<'w, F0>, OrFetch<'w, F1>, OrFetch<'w, F2>, OrFetch<'w, F3>, OrFetch<'w, F4>, OrFetch<'w, F5>, OrFetch<'w, F6>, OrFetch<'w, F7>, OrFetch<'w, F8>, OrFetch<'w, F9>, OrFetch<'w, F10>, OrFetch<'w, F11>)
Per archetype/table state used by this
WorldQuery
to fetch Self::Item
§type Item<'w> = bool
type Item<'w> = bool
The item returned by this
WorldQuery
§type ReadOnly = Or<(<F0 as WorldQuery>::ReadOnly, <F1 as WorldQuery>::ReadOnly, <F2 as WorldQuery>::ReadOnly, <F3 as WorldQuery>::ReadOnly, <F4 as WorldQuery>::ReadOnly, <F5 as WorldQuery>::ReadOnly, <F6 as WorldQuery>::ReadOnly, <F7 as WorldQuery>::ReadOnly, <F8 as WorldQuery>::ReadOnly, <F9 as WorldQuery>::ReadOnly, <F10 as WorldQuery>::ReadOnly, <F11 as WorldQuery>::ReadOnly)>
type ReadOnly = Or<(<F0 as WorldQuery>::ReadOnly, <F1 as WorldQuery>::ReadOnly, <F2 as WorldQuery>::ReadOnly, <F3 as WorldQuery>::ReadOnly, <F4 as WorldQuery>::ReadOnly, <F5 as WorldQuery>::ReadOnly, <F6 as WorldQuery>::ReadOnly, <F7 as WorldQuery>::ReadOnly, <F8 as WorldQuery>::ReadOnly, <F9 as WorldQuery>::ReadOnly, <F10 as WorldQuery>::ReadOnly, <F11 as WorldQuery>::ReadOnly)>
The read-only variant of this
WorldQuery
, which satisfies the ReadOnlyWorldQuery
trait.§type State = (<F0 as WorldQuery>::State, <F1 as WorldQuery>::State, <F2 as WorldQuery>::State, <F3 as WorldQuery>::State, <F4 as WorldQuery>::State, <F5 as WorldQuery>::State, <F6 as WorldQuery>::State, <F7 as WorldQuery>::State, <F8 as WorldQuery>::State, <F9 as WorldQuery>::State, <F10 as WorldQuery>::State, <F11 as WorldQuery>::State)
type State = (<F0 as WorldQuery>::State, <F1 as WorldQuery>::State, <F2 as WorldQuery>::State, <F3 as WorldQuery>::State, <F4 as WorldQuery>::State, <F5 as WorldQuery>::State, <F6 as WorldQuery>::State, <F7 as WorldQuery>::State, <F8 as WorldQuery>::State, <F9 as WorldQuery>::State, <F10 as WorldQuery>::State, <F11 as WorldQuery>::State)
State used to construct a
Self::Fetch
. This will be cached inside QueryState
,
so it is best to move as much data / computation here as possible to reduce the cost of
constructing Self::Fetch
. Read moresource§fn shrink<'wlong: 'wshort, 'wshort>(
item: Self::Item<'wlong>
) -> Self::Item<'wshort>
fn shrink<'wlong: 'wshort, 'wshort>(
item: Self::Item<'wlong>
) -> Self::Item<'wshort>
This function manually implements subtyping for the query items.
source§const IS_DENSE: bool = _
const IS_DENSE: bool = _
Returns true if (and only if) every table of every archetype matched by this fetch contains
all of the matched components. This is used to select a more efficient “table iterator”
for “dense” queries. If this returns true,
WorldQuery::set_table
must be used before
WorldQuery::fetch
can be called for iterators. If this returns false,
WorldQuery::set_archetype
must be used before WorldQuery::fetch
can be called for
iterators. Read moresource§const IS_ARCHETYPAL: bool = _
const IS_ARCHETYPAL: bool = _
Returns true if (and only if) this Fetch relies strictly on archetypes to limit which
components are accessed by the Query. Read more
source§unsafe fn init_fetch<'w>(
world: &'w World,
state: &Self::State,
last_change_tick: u32,
change_tick: u32
) -> Self::Fetch<'w>
unsafe fn init_fetch<'w>(
world: &'w World,
state: &Self::State,
last_change_tick: u32,
change_tick: u32
) -> Self::Fetch<'w>
Creates a new instance of this fetch. Read more
source§unsafe fn clone_fetch<'w>(fetch: &Self::Fetch<'w>) -> Self::Fetch<'w>
unsafe fn clone_fetch<'w>(fetch: &Self::Fetch<'w>) -> Self::Fetch<'w>
While this function can be called for any query, it is always safe to call if
Self: ReadOnlyWorldQuery
holds. Read moresource§unsafe fn set_table<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
table: &'w Table
)
unsafe fn set_table<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
table: &'w Table
)
Adjusts internal state to account for the next
Table
. This will always be called on tables
that match this WorldQuery
. Read moresource§unsafe fn set_archetype<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
archetype: &'w Archetype,
table: &'w Table
)
unsafe fn set_archetype<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
archetype: &'w Archetype,
table: &'w Table
)
Adjusts internal state to account for the next
Archetype
. This will always be called on
archetypes that match this WorldQuery
. Read moresource§unsafe fn fetch<'w>(
fetch: &mut Self::Fetch<'w>,
_entity: Entity,
_table_row: usize
) -> Self::Item<'w>
unsafe fn fetch<'w>(
fetch: &mut Self::Fetch<'w>,
_entity: Entity,
_table_row: usize
) -> Self::Item<'w>
Fetch
Self::Item
for either the given entity
in the current Table
,
or for the given entity
in the current Archetype
. This must always be called after
WorldQuery::set_table
with a table_row
in the range of the current Table
or after
WorldQuery::set_archetype
with a entity
in the current archetype. Read moresource§unsafe fn filter_fetch<'w>(
fetch: &mut Self::Fetch<'w>,
entity: Entity,
table_row: usize
) -> bool
unsafe fn filter_fetch<'w>(
fetch: &mut Self::Fetch<'w>,
entity: Entity,
table_row: usize
) -> bool
Safety Read more
fn update_component_access(
state: &Self::State,
access: &mut FilteredAccess<ComponentId>
)
fn update_archetype_component_access(
state: &Self::State,
archetype: &Archetype,
access: &mut Access<ArchetypeComponentId>
)
fn init_state(world: &mut World) -> Self::State
fn matches_component_set(
_state: &Self::State,
_set_contains_id: &impl Fn(ComponentId) -> bool
) -> bool
source§impl<F0: WorldQuery, F1: WorldQuery, F2: WorldQuery, F3: WorldQuery, F4: WorldQuery, F5: WorldQuery, F6: WorldQuery, F7: WorldQuery, F8: WorldQuery, F9: WorldQuery, F10: WorldQuery> WorldQuery for Or<(F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10)>
impl<F0: WorldQuery, F1: WorldQuery, F2: WorldQuery, F3: WorldQuery, F4: WorldQuery, F5: WorldQuery, F6: WorldQuery, F7: WorldQuery, F8: WorldQuery, F9: WorldQuery, F10: WorldQuery> WorldQuery for Or<(F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10)>
§type Fetch<'w> = (OrFetch<'w, F0>, OrFetch<'w, F1>, OrFetch<'w, F2>, OrFetch<'w, F3>, OrFetch<'w, F4>, OrFetch<'w, F5>, OrFetch<'w, F6>, OrFetch<'w, F7>, OrFetch<'w, F8>, OrFetch<'w, F9>, OrFetch<'w, F10>)
type Fetch<'w> = (OrFetch<'w, F0>, OrFetch<'w, F1>, OrFetch<'w, F2>, OrFetch<'w, F3>, OrFetch<'w, F4>, OrFetch<'w, F5>, OrFetch<'w, F6>, OrFetch<'w, F7>, OrFetch<'w, F8>, OrFetch<'w, F9>, OrFetch<'w, F10>)
Per archetype/table state used by this
WorldQuery
to fetch Self::Item
§type Item<'w> = bool
type Item<'w> = bool
The item returned by this
WorldQuery
§type ReadOnly = Or<(<F0 as WorldQuery>::ReadOnly, <F1 as WorldQuery>::ReadOnly, <F2 as WorldQuery>::ReadOnly, <F3 as WorldQuery>::ReadOnly, <F4 as WorldQuery>::ReadOnly, <F5 as WorldQuery>::ReadOnly, <F6 as WorldQuery>::ReadOnly, <F7 as WorldQuery>::ReadOnly, <F8 as WorldQuery>::ReadOnly, <F9 as WorldQuery>::ReadOnly, <F10 as WorldQuery>::ReadOnly)>
type ReadOnly = Or<(<F0 as WorldQuery>::ReadOnly, <F1 as WorldQuery>::ReadOnly, <F2 as WorldQuery>::ReadOnly, <F3 as WorldQuery>::ReadOnly, <F4 as WorldQuery>::ReadOnly, <F5 as WorldQuery>::ReadOnly, <F6 as WorldQuery>::ReadOnly, <F7 as WorldQuery>::ReadOnly, <F8 as WorldQuery>::ReadOnly, <F9 as WorldQuery>::ReadOnly, <F10 as WorldQuery>::ReadOnly)>
The read-only variant of this
WorldQuery
, which satisfies the ReadOnlyWorldQuery
trait.§type State = (<F0 as WorldQuery>::State, <F1 as WorldQuery>::State, <F2 as WorldQuery>::State, <F3 as WorldQuery>::State, <F4 as WorldQuery>::State, <F5 as WorldQuery>::State, <F6 as WorldQuery>::State, <F7 as WorldQuery>::State, <F8 as WorldQuery>::State, <F9 as WorldQuery>::State, <F10 as WorldQuery>::State)
type State = (<F0 as WorldQuery>::State, <F1 as WorldQuery>::State, <F2 as WorldQuery>::State, <F3 as WorldQuery>::State, <F4 as WorldQuery>::State, <F5 as WorldQuery>::State, <F6 as WorldQuery>::State, <F7 as WorldQuery>::State, <F8 as WorldQuery>::State, <F9 as WorldQuery>::State, <F10 as WorldQuery>::State)
State used to construct a
Self::Fetch
. This will be cached inside QueryState
,
so it is best to move as much data / computation here as possible to reduce the cost of
constructing Self::Fetch
. Read moresource§fn shrink<'wlong: 'wshort, 'wshort>(
item: Self::Item<'wlong>
) -> Self::Item<'wshort>
fn shrink<'wlong: 'wshort, 'wshort>(
item: Self::Item<'wlong>
) -> Self::Item<'wshort>
This function manually implements subtyping for the query items.
source§const IS_DENSE: bool = _
const IS_DENSE: bool = _
Returns true if (and only if) every table of every archetype matched by this fetch contains
all of the matched components. This is used to select a more efficient “table iterator”
for “dense” queries. If this returns true,
WorldQuery::set_table
must be used before
WorldQuery::fetch
can be called for iterators. If this returns false,
WorldQuery::set_archetype
must be used before WorldQuery::fetch
can be called for
iterators. Read moresource§const IS_ARCHETYPAL: bool = _
const IS_ARCHETYPAL: bool = _
Returns true if (and only if) this Fetch relies strictly on archetypes to limit which
components are accessed by the Query. Read more
source§unsafe fn init_fetch<'w>(
world: &'w World,
state: &Self::State,
last_change_tick: u32,
change_tick: u32
) -> Self::Fetch<'w>
unsafe fn init_fetch<'w>(
world: &'w World,
state: &Self::State,
last_change_tick: u32,
change_tick: u32
) -> Self::Fetch<'w>
Creates a new instance of this fetch. Read more
source§unsafe fn clone_fetch<'w>(fetch: &Self::Fetch<'w>) -> Self::Fetch<'w>
unsafe fn clone_fetch<'w>(fetch: &Self::Fetch<'w>) -> Self::Fetch<'w>
While this function can be called for any query, it is always safe to call if
Self: ReadOnlyWorldQuery
holds. Read moresource§unsafe fn set_table<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
table: &'w Table
)
unsafe fn set_table<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
table: &'w Table
)
Adjusts internal state to account for the next
Table
. This will always be called on tables
that match this WorldQuery
. Read moresource§unsafe fn set_archetype<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
archetype: &'w Archetype,
table: &'w Table
)
unsafe fn set_archetype<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
archetype: &'w Archetype,
table: &'w Table
)
Adjusts internal state to account for the next
Archetype
. This will always be called on
archetypes that match this WorldQuery
. Read moresource§unsafe fn fetch<'w>(
fetch: &mut Self::Fetch<'w>,
_entity: Entity,
_table_row: usize
) -> Self::Item<'w>
unsafe fn fetch<'w>(
fetch: &mut Self::Fetch<'w>,
_entity: Entity,
_table_row: usize
) -> Self::Item<'w>
Fetch
Self::Item
for either the given entity
in the current Table
,
or for the given entity
in the current Archetype
. This must always be called after
WorldQuery::set_table
with a table_row
in the range of the current Table
or after
WorldQuery::set_archetype
with a entity
in the current archetype. Read moresource§unsafe fn filter_fetch<'w>(
fetch: &mut Self::Fetch<'w>,
entity: Entity,
table_row: usize
) -> bool
unsafe fn filter_fetch<'w>(
fetch: &mut Self::Fetch<'w>,
entity: Entity,
table_row: usize
) -> bool
Safety Read more
fn update_component_access(
state: &Self::State,
access: &mut FilteredAccess<ComponentId>
)
fn update_archetype_component_access(
state: &Self::State,
archetype: &Archetype,
access: &mut Access<ArchetypeComponentId>
)
fn init_state(world: &mut World) -> Self::State
fn matches_component_set(
_state: &Self::State,
_set_contains_id: &impl Fn(ComponentId) -> bool
) -> bool
source§impl<F0: WorldQuery, F1: WorldQuery, F2: WorldQuery, F3: WorldQuery, F4: WorldQuery, F5: WorldQuery, F6: WorldQuery, F7: WorldQuery, F8: WorldQuery, F9: WorldQuery> WorldQuery for Or<(F0, F1, F2, F3, F4, F5, F6, F7, F8, F9)>
impl<F0: WorldQuery, F1: WorldQuery, F2: WorldQuery, F3: WorldQuery, F4: WorldQuery, F5: WorldQuery, F6: WorldQuery, F7: WorldQuery, F8: WorldQuery, F9: WorldQuery> WorldQuery for Or<(F0, F1, F2, F3, F4, F5, F6, F7, F8, F9)>
§type Fetch<'w> = (OrFetch<'w, F0>, OrFetch<'w, F1>, OrFetch<'w, F2>, OrFetch<'w, F3>, OrFetch<'w, F4>, OrFetch<'w, F5>, OrFetch<'w, F6>, OrFetch<'w, F7>, OrFetch<'w, F8>, OrFetch<'w, F9>)
type Fetch<'w> = (OrFetch<'w, F0>, OrFetch<'w, F1>, OrFetch<'w, F2>, OrFetch<'w, F3>, OrFetch<'w, F4>, OrFetch<'w, F5>, OrFetch<'w, F6>, OrFetch<'w, F7>, OrFetch<'w, F8>, OrFetch<'w, F9>)
Per archetype/table state used by this
WorldQuery
to fetch Self::Item
§type Item<'w> = bool
type Item<'w> = bool
The item returned by this
WorldQuery
§type ReadOnly = Or<(<F0 as WorldQuery>::ReadOnly, <F1 as WorldQuery>::ReadOnly, <F2 as WorldQuery>::ReadOnly, <F3 as WorldQuery>::ReadOnly, <F4 as WorldQuery>::ReadOnly, <F5 as WorldQuery>::ReadOnly, <F6 as WorldQuery>::ReadOnly, <F7 as WorldQuery>::ReadOnly, <F8 as WorldQuery>::ReadOnly, <F9 as WorldQuery>::ReadOnly)>
type ReadOnly = Or<(<F0 as WorldQuery>::ReadOnly, <F1 as WorldQuery>::ReadOnly, <F2 as WorldQuery>::ReadOnly, <F3 as WorldQuery>::ReadOnly, <F4 as WorldQuery>::ReadOnly, <F5 as WorldQuery>::ReadOnly, <F6 as WorldQuery>::ReadOnly, <F7 as WorldQuery>::ReadOnly, <F8 as WorldQuery>::ReadOnly, <F9 as WorldQuery>::ReadOnly)>
The read-only variant of this
WorldQuery
, which satisfies the ReadOnlyWorldQuery
trait.§type State = (<F0 as WorldQuery>::State, <F1 as WorldQuery>::State, <F2 as WorldQuery>::State, <F3 as WorldQuery>::State, <F4 as WorldQuery>::State, <F5 as WorldQuery>::State, <F6 as WorldQuery>::State, <F7 as WorldQuery>::State, <F8 as WorldQuery>::State, <F9 as WorldQuery>::State)
type State = (<F0 as WorldQuery>::State, <F1 as WorldQuery>::State, <F2 as WorldQuery>::State, <F3 as WorldQuery>::State, <F4 as WorldQuery>::State, <F5 as WorldQuery>::State, <F6 as WorldQuery>::State, <F7 as WorldQuery>::State, <F8 as WorldQuery>::State, <F9 as WorldQuery>::State)
State used to construct a
Self::Fetch
. This will be cached inside QueryState
,
so it is best to move as much data / computation here as possible to reduce the cost of
constructing Self::Fetch
. Read moresource§fn shrink<'wlong: 'wshort, 'wshort>(
item: Self::Item<'wlong>
) -> Self::Item<'wshort>
fn shrink<'wlong: 'wshort, 'wshort>(
item: Self::Item<'wlong>
) -> Self::Item<'wshort>
This function manually implements subtyping for the query items.
source§const IS_DENSE: bool = _
const IS_DENSE: bool = _
Returns true if (and only if) every table of every archetype matched by this fetch contains
all of the matched components. This is used to select a more efficient “table iterator”
for “dense” queries. If this returns true,
WorldQuery::set_table
must be used before
WorldQuery::fetch
can be called for iterators. If this returns false,
WorldQuery::set_archetype
must be used before WorldQuery::fetch
can be called for
iterators. Read moresource§const IS_ARCHETYPAL: bool = _
const IS_ARCHETYPAL: bool = _
Returns true if (and only if) this Fetch relies strictly on archetypes to limit which
components are accessed by the Query. Read more
source§unsafe fn init_fetch<'w>(
world: &'w World,
state: &Self::State,
last_change_tick: u32,
change_tick: u32
) -> Self::Fetch<'w>
unsafe fn init_fetch<'w>(
world: &'w World,
state: &Self::State,
last_change_tick: u32,
change_tick: u32
) -> Self::Fetch<'w>
Creates a new instance of this fetch. Read more
source§unsafe fn clone_fetch<'w>(fetch: &Self::Fetch<'w>) -> Self::Fetch<'w>
unsafe fn clone_fetch<'w>(fetch: &Self::Fetch<'w>) -> Self::Fetch<'w>
While this function can be called for any query, it is always safe to call if
Self: ReadOnlyWorldQuery
holds. Read moresource§unsafe fn set_table<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
table: &'w Table
)
unsafe fn set_table<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
table: &'w Table
)
Adjusts internal state to account for the next
Table
. This will always be called on tables
that match this WorldQuery
. Read moresource§unsafe fn set_archetype<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
archetype: &'w Archetype,
table: &'w Table
)
unsafe fn set_archetype<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
archetype: &'w Archetype,
table: &'w Table
)
Adjusts internal state to account for the next
Archetype
. This will always be called on
archetypes that match this WorldQuery
. Read moresource§unsafe fn fetch<'w>(
fetch: &mut Self::Fetch<'w>,
_entity: Entity,
_table_row: usize
) -> Self::Item<'w>
unsafe fn fetch<'w>(
fetch: &mut Self::Fetch<'w>,
_entity: Entity,
_table_row: usize
) -> Self::Item<'w>
Fetch
Self::Item
for either the given entity
in the current Table
,
or for the given entity
in the current Archetype
. This must always be called after
WorldQuery::set_table
with a table_row
in the range of the current Table
or after
WorldQuery::set_archetype
with a entity
in the current archetype. Read moresource§unsafe fn filter_fetch<'w>(
fetch: &mut Self::Fetch<'w>,
entity: Entity,
table_row: usize
) -> bool
unsafe fn filter_fetch<'w>(
fetch: &mut Self::Fetch<'w>,
entity: Entity,
table_row: usize
) -> bool
Safety Read more
fn update_component_access(
state: &Self::State,
access: &mut FilteredAccess<ComponentId>
)
fn update_archetype_component_access(
state: &Self::State,
archetype: &Archetype,
access: &mut Access<ArchetypeComponentId>
)
fn init_state(world: &mut World) -> Self::State
fn matches_component_set(
_state: &Self::State,
_set_contains_id: &impl Fn(ComponentId) -> bool
) -> bool
source§impl<F0: WorldQuery, F1: WorldQuery, F2: WorldQuery, F3: WorldQuery, F4: WorldQuery, F5: WorldQuery, F6: WorldQuery, F7: WorldQuery, F8: WorldQuery> WorldQuery for Or<(F0, F1, F2, F3, F4, F5, F6, F7, F8)>
impl<F0: WorldQuery, F1: WorldQuery, F2: WorldQuery, F3: WorldQuery, F4: WorldQuery, F5: WorldQuery, F6: WorldQuery, F7: WorldQuery, F8: WorldQuery> WorldQuery for Or<(F0, F1, F2, F3, F4, F5, F6, F7, F8)>
§type Fetch<'w> = (OrFetch<'w, F0>, OrFetch<'w, F1>, OrFetch<'w, F2>, OrFetch<'w, F3>, OrFetch<'w, F4>, OrFetch<'w, F5>, OrFetch<'w, F6>, OrFetch<'w, F7>, OrFetch<'w, F8>)
type Fetch<'w> = (OrFetch<'w, F0>, OrFetch<'w, F1>, OrFetch<'w, F2>, OrFetch<'w, F3>, OrFetch<'w, F4>, OrFetch<'w, F5>, OrFetch<'w, F6>, OrFetch<'w, F7>, OrFetch<'w, F8>)
Per archetype/table state used by this
WorldQuery
to fetch Self::Item
§type Item<'w> = bool
type Item<'w> = bool
The item returned by this
WorldQuery
§type ReadOnly = Or<(<F0 as WorldQuery>::ReadOnly, <F1 as WorldQuery>::ReadOnly, <F2 as WorldQuery>::ReadOnly, <F3 as WorldQuery>::ReadOnly, <F4 as WorldQuery>::ReadOnly, <F5 as WorldQuery>::ReadOnly, <F6 as WorldQuery>::ReadOnly, <F7 as WorldQuery>::ReadOnly, <F8 as WorldQuery>::ReadOnly)>
type ReadOnly = Or<(<F0 as WorldQuery>::ReadOnly, <F1 as WorldQuery>::ReadOnly, <F2 as WorldQuery>::ReadOnly, <F3 as WorldQuery>::ReadOnly, <F4 as WorldQuery>::ReadOnly, <F5 as WorldQuery>::ReadOnly, <F6 as WorldQuery>::ReadOnly, <F7 as WorldQuery>::ReadOnly, <F8 as WorldQuery>::ReadOnly)>
The read-only variant of this
WorldQuery
, which satisfies the ReadOnlyWorldQuery
trait.§type State = (<F0 as WorldQuery>::State, <F1 as WorldQuery>::State, <F2 as WorldQuery>::State, <F3 as WorldQuery>::State, <F4 as WorldQuery>::State, <F5 as WorldQuery>::State, <F6 as WorldQuery>::State, <F7 as WorldQuery>::State, <F8 as WorldQuery>::State)
type State = (<F0 as WorldQuery>::State, <F1 as WorldQuery>::State, <F2 as WorldQuery>::State, <F3 as WorldQuery>::State, <F4 as WorldQuery>::State, <F5 as WorldQuery>::State, <F6 as WorldQuery>::State, <F7 as WorldQuery>::State, <F8 as WorldQuery>::State)
State used to construct a
Self::Fetch
. This will be cached inside QueryState
,
so it is best to move as much data / computation here as possible to reduce the cost of
constructing Self::Fetch
. Read moresource§fn shrink<'wlong: 'wshort, 'wshort>(
item: Self::Item<'wlong>
) -> Self::Item<'wshort>
fn shrink<'wlong: 'wshort, 'wshort>(
item: Self::Item<'wlong>
) -> Self::Item<'wshort>
This function manually implements subtyping for the query items.
source§const IS_DENSE: bool = _
const IS_DENSE: bool = _
Returns true if (and only if) every table of every archetype matched by this fetch contains
all of the matched components. This is used to select a more efficient “table iterator”
for “dense” queries. If this returns true,
WorldQuery::set_table
must be used before
WorldQuery::fetch
can be called for iterators. If this returns false,
WorldQuery::set_archetype
must be used before WorldQuery::fetch
can be called for
iterators. Read moresource§const IS_ARCHETYPAL: bool = _
const IS_ARCHETYPAL: bool = _
Returns true if (and only if) this Fetch relies strictly on archetypes to limit which
components are accessed by the Query. Read more
source§unsafe fn init_fetch<'w>(
world: &'w World,
state: &Self::State,
last_change_tick: u32,
change_tick: u32
) -> Self::Fetch<'w>
unsafe fn init_fetch<'w>(
world: &'w World,
state: &Self::State,
last_change_tick: u32,
change_tick: u32
) -> Self::Fetch<'w>
Creates a new instance of this fetch. Read more
source§unsafe fn clone_fetch<'w>(fetch: &Self::Fetch<'w>) -> Self::Fetch<'w>
unsafe fn clone_fetch<'w>(fetch: &Self::Fetch<'w>) -> Self::Fetch<'w>
While this function can be called for any query, it is always safe to call if
Self: ReadOnlyWorldQuery
holds. Read moresource§unsafe fn set_table<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
table: &'w Table
)
unsafe fn set_table<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
table: &'w Table
)
Adjusts internal state to account for the next
Table
. This will always be called on tables
that match this WorldQuery
. Read moresource§unsafe fn set_archetype<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
archetype: &'w Archetype,
table: &'w Table
)
unsafe fn set_archetype<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
archetype: &'w Archetype,
table: &'w Table
)
Adjusts internal state to account for the next
Archetype
. This will always be called on
archetypes that match this WorldQuery
. Read moresource§unsafe fn fetch<'w>(
fetch: &mut Self::Fetch<'w>,
_entity: Entity,
_table_row: usize
) -> Self::Item<'w>
unsafe fn fetch<'w>(
fetch: &mut Self::Fetch<'w>,
_entity: Entity,
_table_row: usize
) -> Self::Item<'w>
Fetch
Self::Item
for either the given entity
in the current Table
,
or for the given entity
in the current Archetype
. This must always be called after
WorldQuery::set_table
with a table_row
in the range of the current Table
or after
WorldQuery::set_archetype
with a entity
in the current archetype. Read moresource§unsafe fn filter_fetch<'w>(
fetch: &mut Self::Fetch<'w>,
entity: Entity,
table_row: usize
) -> bool
unsafe fn filter_fetch<'w>(
fetch: &mut Self::Fetch<'w>,
entity: Entity,
table_row: usize
) -> bool
Safety Read more
fn update_component_access(
state: &Self::State,
access: &mut FilteredAccess<ComponentId>
)
fn update_archetype_component_access(
state: &Self::State,
archetype: &Archetype,
access: &mut Access<ArchetypeComponentId>
)
fn init_state(world: &mut World) -> Self::State
fn matches_component_set(
_state: &Self::State,
_set_contains_id: &impl Fn(ComponentId) -> bool
) -> bool
source§impl<F0: WorldQuery, F1: WorldQuery, F2: WorldQuery, F3: WorldQuery, F4: WorldQuery, F5: WorldQuery, F6: WorldQuery, F7: WorldQuery> WorldQuery for Or<(F0, F1, F2, F3, F4, F5, F6, F7)>
impl<F0: WorldQuery, F1: WorldQuery, F2: WorldQuery, F3: WorldQuery, F4: WorldQuery, F5: WorldQuery, F6: WorldQuery, F7: WorldQuery> WorldQuery for Or<(F0, F1, F2, F3, F4, F5, F6, F7)>
§type Fetch<'w> = (OrFetch<'w, F0>, OrFetch<'w, F1>, OrFetch<'w, F2>, OrFetch<'w, F3>, OrFetch<'w, F4>, OrFetch<'w, F5>, OrFetch<'w, F6>, OrFetch<'w, F7>)
type Fetch<'w> = (OrFetch<'w, F0>, OrFetch<'w, F1>, OrFetch<'w, F2>, OrFetch<'w, F3>, OrFetch<'w, F4>, OrFetch<'w, F5>, OrFetch<'w, F6>, OrFetch<'w, F7>)
Per archetype/table state used by this
WorldQuery
to fetch Self::Item
§type Item<'w> = bool
type Item<'w> = bool
The item returned by this
WorldQuery
§type ReadOnly = Or<(<F0 as WorldQuery>::ReadOnly, <F1 as WorldQuery>::ReadOnly, <F2 as WorldQuery>::ReadOnly, <F3 as WorldQuery>::ReadOnly, <F4 as WorldQuery>::ReadOnly, <F5 as WorldQuery>::ReadOnly, <F6 as WorldQuery>::ReadOnly, <F7 as WorldQuery>::ReadOnly)>
type ReadOnly = Or<(<F0 as WorldQuery>::ReadOnly, <F1 as WorldQuery>::ReadOnly, <F2 as WorldQuery>::ReadOnly, <F3 as WorldQuery>::ReadOnly, <F4 as WorldQuery>::ReadOnly, <F5 as WorldQuery>::ReadOnly, <F6 as WorldQuery>::ReadOnly, <F7 as WorldQuery>::ReadOnly)>
The read-only variant of this
WorldQuery
, which satisfies the ReadOnlyWorldQuery
trait.§type State = (<F0 as WorldQuery>::State, <F1 as WorldQuery>::State, <F2 as WorldQuery>::State, <F3 as WorldQuery>::State, <F4 as WorldQuery>::State, <F5 as WorldQuery>::State, <F6 as WorldQuery>::State, <F7 as WorldQuery>::State)
type State = (<F0 as WorldQuery>::State, <F1 as WorldQuery>::State, <F2 as WorldQuery>::State, <F3 as WorldQuery>::State, <F4 as WorldQuery>::State, <F5 as WorldQuery>::State, <F6 as WorldQuery>::State, <F7 as WorldQuery>::State)
State used to construct a
Self::Fetch
. This will be cached inside QueryState
,
so it is best to move as much data / computation here as possible to reduce the cost of
constructing Self::Fetch
. Read moresource§fn shrink<'wlong: 'wshort, 'wshort>(
item: Self::Item<'wlong>
) -> Self::Item<'wshort>
fn shrink<'wlong: 'wshort, 'wshort>(
item: Self::Item<'wlong>
) -> Self::Item<'wshort>
This function manually implements subtyping for the query items.
source§const IS_DENSE: bool = _
const IS_DENSE: bool = _
Returns true if (and only if) every table of every archetype matched by this fetch contains
all of the matched components. This is used to select a more efficient “table iterator”
for “dense” queries. If this returns true,
WorldQuery::set_table
must be used before
WorldQuery::fetch
can be called for iterators. If this returns false,
WorldQuery::set_archetype
must be used before WorldQuery::fetch
can be called for
iterators. Read moresource§const IS_ARCHETYPAL: bool = _
const IS_ARCHETYPAL: bool = _
Returns true if (and only if) this Fetch relies strictly on archetypes to limit which
components are accessed by the Query. Read more
source§unsafe fn init_fetch<'w>(
world: &'w World,
state: &Self::State,
last_change_tick: u32,
change_tick: u32
) -> Self::Fetch<'w>
unsafe fn init_fetch<'w>(
world: &'w World,
state: &Self::State,
last_change_tick: u32,
change_tick: u32
) -> Self::Fetch<'w>
Creates a new instance of this fetch. Read more
source§unsafe fn clone_fetch<'w>(fetch: &Self::Fetch<'w>) -> Self::Fetch<'w>
unsafe fn clone_fetch<'w>(fetch: &Self::Fetch<'w>) -> Self::Fetch<'w>
While this function can be called for any query, it is always safe to call if
Self: ReadOnlyWorldQuery
holds. Read moresource§unsafe fn set_table<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
table: &'w Table
)
unsafe fn set_table<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
table: &'w Table
)
Adjusts internal state to account for the next
Table
. This will always be called on tables
that match this WorldQuery
. Read moresource§unsafe fn set_archetype<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
archetype: &'w Archetype,
table: &'w Table
)
unsafe fn set_archetype<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
archetype: &'w Archetype,
table: &'w Table
)
Adjusts internal state to account for the next
Archetype
. This will always be called on
archetypes that match this WorldQuery
. Read moresource§unsafe fn fetch<'w>(
fetch: &mut Self::Fetch<'w>,
_entity: Entity,
_table_row: usize
) -> Self::Item<'w>
unsafe fn fetch<'w>(
fetch: &mut Self::Fetch<'w>,
_entity: Entity,
_table_row: usize
) -> Self::Item<'w>
Fetch
Self::Item
for either the given entity
in the current Table
,
or for the given entity
in the current Archetype
. This must always be called after
WorldQuery::set_table
with a table_row
in the range of the current Table
or after
WorldQuery::set_archetype
with a entity
in the current archetype. Read moresource§unsafe fn filter_fetch<'w>(
fetch: &mut Self::Fetch<'w>,
entity: Entity,
table_row: usize
) -> bool
unsafe fn filter_fetch<'w>(
fetch: &mut Self::Fetch<'w>,
entity: Entity,
table_row: usize
) -> bool
Safety Read more
fn update_component_access(
state: &Self::State,
access: &mut FilteredAccess<ComponentId>
)
fn update_archetype_component_access(
state: &Self::State,
archetype: &Archetype,
access: &mut Access<ArchetypeComponentId>
)
fn init_state(world: &mut World) -> Self::State
fn matches_component_set(
_state: &Self::State,
_set_contains_id: &impl Fn(ComponentId) -> bool
) -> bool
source§impl<F0: WorldQuery, F1: WorldQuery, F2: WorldQuery, F3: WorldQuery, F4: WorldQuery, F5: WorldQuery, F6: WorldQuery> WorldQuery for Or<(F0, F1, F2, F3, F4, F5, F6)>
impl<F0: WorldQuery, F1: WorldQuery, F2: WorldQuery, F3: WorldQuery, F4: WorldQuery, F5: WorldQuery, F6: WorldQuery> WorldQuery for Or<(F0, F1, F2, F3, F4, F5, F6)>
§type Fetch<'w> = (OrFetch<'w, F0>, OrFetch<'w, F1>, OrFetch<'w, F2>, OrFetch<'w, F3>, OrFetch<'w, F4>, OrFetch<'w, F5>, OrFetch<'w, F6>)
type Fetch<'w> = (OrFetch<'w, F0>, OrFetch<'w, F1>, OrFetch<'w, F2>, OrFetch<'w, F3>, OrFetch<'w, F4>, OrFetch<'w, F5>, OrFetch<'w, F6>)
Per archetype/table state used by this
WorldQuery
to fetch Self::Item
§type Item<'w> = bool
type Item<'w> = bool
The item returned by this
WorldQuery
§type ReadOnly = Or<(<F0 as WorldQuery>::ReadOnly, <F1 as WorldQuery>::ReadOnly, <F2 as WorldQuery>::ReadOnly, <F3 as WorldQuery>::ReadOnly, <F4 as WorldQuery>::ReadOnly, <F5 as WorldQuery>::ReadOnly, <F6 as WorldQuery>::ReadOnly)>
type ReadOnly = Or<(<F0 as WorldQuery>::ReadOnly, <F1 as WorldQuery>::ReadOnly, <F2 as WorldQuery>::ReadOnly, <F3 as WorldQuery>::ReadOnly, <F4 as WorldQuery>::ReadOnly, <F5 as WorldQuery>::ReadOnly, <F6 as WorldQuery>::ReadOnly)>
The read-only variant of this
WorldQuery
, which satisfies the ReadOnlyWorldQuery
trait.§type State = (<F0 as WorldQuery>::State, <F1 as WorldQuery>::State, <F2 as WorldQuery>::State, <F3 as WorldQuery>::State, <F4 as WorldQuery>::State, <F5 as WorldQuery>::State, <F6 as WorldQuery>::State)
type State = (<F0 as WorldQuery>::State, <F1 as WorldQuery>::State, <F2 as WorldQuery>::State, <F3 as WorldQuery>::State, <F4 as WorldQuery>::State, <F5 as WorldQuery>::State, <F6 as WorldQuery>::State)
State used to construct a
Self::Fetch
. This will be cached inside QueryState
,
so it is best to move as much data / computation here as possible to reduce the cost of
constructing Self::Fetch
. Read moresource§fn shrink<'wlong: 'wshort, 'wshort>(
item: Self::Item<'wlong>
) -> Self::Item<'wshort>
fn shrink<'wlong: 'wshort, 'wshort>(
item: Self::Item<'wlong>
) -> Self::Item<'wshort>
This function manually implements subtyping for the query items.
source§const IS_DENSE: bool = _
const IS_DENSE: bool = _
Returns true if (and only if) every table of every archetype matched by this fetch contains
all of the matched components. This is used to select a more efficient “table iterator”
for “dense” queries. If this returns true,
WorldQuery::set_table
must be used before
WorldQuery::fetch
can be called for iterators. If this returns false,
WorldQuery::set_archetype
must be used before WorldQuery::fetch
can be called for
iterators. Read moresource§const IS_ARCHETYPAL: bool = _
const IS_ARCHETYPAL: bool = _
Returns true if (and only if) this Fetch relies strictly on archetypes to limit which
components are accessed by the Query. Read more
source§unsafe fn init_fetch<'w>(
world: &'w World,
state: &Self::State,
last_change_tick: u32,
change_tick: u32
) -> Self::Fetch<'w>
unsafe fn init_fetch<'w>(
world: &'w World,
state: &Self::State,
last_change_tick: u32,
change_tick: u32
) -> Self::Fetch<'w>
Creates a new instance of this fetch. Read more
source§unsafe fn clone_fetch<'w>(fetch: &Self::Fetch<'w>) -> Self::Fetch<'w>
unsafe fn clone_fetch<'w>(fetch: &Self::Fetch<'w>) -> Self::Fetch<'w>
While this function can be called for any query, it is always safe to call if
Self: ReadOnlyWorldQuery
holds. Read moresource§unsafe fn set_table<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
table: &'w Table
)
unsafe fn set_table<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
table: &'w Table
)
Adjusts internal state to account for the next
Table
. This will always be called on tables
that match this WorldQuery
. Read moresource§unsafe fn set_archetype<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
archetype: &'w Archetype,
table: &'w Table
)
unsafe fn set_archetype<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
archetype: &'w Archetype,
table: &'w Table
)
Adjusts internal state to account for the next
Archetype
. This will always be called on
archetypes that match this WorldQuery
. Read moresource§unsafe fn fetch<'w>(
fetch: &mut Self::Fetch<'w>,
_entity: Entity,
_table_row: usize
) -> Self::Item<'w>
unsafe fn fetch<'w>(
fetch: &mut Self::Fetch<'w>,
_entity: Entity,
_table_row: usize
) -> Self::Item<'w>
Fetch
Self::Item
for either the given entity
in the current Table
,
or for the given entity
in the current Archetype
. This must always be called after
WorldQuery::set_table
with a table_row
in the range of the current Table
or after
WorldQuery::set_archetype
with a entity
in the current archetype. Read moresource§unsafe fn filter_fetch<'w>(
fetch: &mut Self::Fetch<'w>,
entity: Entity,
table_row: usize
) -> bool
unsafe fn filter_fetch<'w>(
fetch: &mut Self::Fetch<'w>,
entity: Entity,
table_row: usize
) -> bool
Safety Read more
fn update_component_access(
state: &Self::State,
access: &mut FilteredAccess<ComponentId>
)
fn update_archetype_component_access(
state: &Self::State,
archetype: &Archetype,
access: &mut Access<ArchetypeComponentId>
)
fn init_state(world: &mut World) -> Self::State
fn matches_component_set(
_state: &Self::State,
_set_contains_id: &impl Fn(ComponentId) -> bool
) -> bool
source§impl<F0: WorldQuery, F1: WorldQuery, F2: WorldQuery, F3: WorldQuery, F4: WorldQuery, F5: WorldQuery> WorldQuery for Or<(F0, F1, F2, F3, F4, F5)>
impl<F0: WorldQuery, F1: WorldQuery, F2: WorldQuery, F3: WorldQuery, F4: WorldQuery, F5: WorldQuery> WorldQuery for Or<(F0, F1, F2, F3, F4, F5)>
§type Fetch<'w> = (OrFetch<'w, F0>, OrFetch<'w, F1>, OrFetch<'w, F2>, OrFetch<'w, F3>, OrFetch<'w, F4>, OrFetch<'w, F5>)
type Fetch<'w> = (OrFetch<'w, F0>, OrFetch<'w, F1>, OrFetch<'w, F2>, OrFetch<'w, F3>, OrFetch<'w, F4>, OrFetch<'w, F5>)
Per archetype/table state used by this
WorldQuery
to fetch Self::Item
§type Item<'w> = bool
type Item<'w> = bool
The item returned by this
WorldQuery
§type ReadOnly = Or<(<F0 as WorldQuery>::ReadOnly, <F1 as WorldQuery>::ReadOnly, <F2 as WorldQuery>::ReadOnly, <F3 as WorldQuery>::ReadOnly, <F4 as WorldQuery>::ReadOnly, <F5 as WorldQuery>::ReadOnly)>
type ReadOnly = Or<(<F0 as WorldQuery>::ReadOnly, <F1 as WorldQuery>::ReadOnly, <F2 as WorldQuery>::ReadOnly, <F3 as WorldQuery>::ReadOnly, <F4 as WorldQuery>::ReadOnly, <F5 as WorldQuery>::ReadOnly)>
The read-only variant of this
WorldQuery
, which satisfies the ReadOnlyWorldQuery
trait.§type State = (<F0 as WorldQuery>::State, <F1 as WorldQuery>::State, <F2 as WorldQuery>::State, <F3 as WorldQuery>::State, <F4 as WorldQuery>::State, <F5 as WorldQuery>::State)
type State = (<F0 as WorldQuery>::State, <F1 as WorldQuery>::State, <F2 as WorldQuery>::State, <F3 as WorldQuery>::State, <F4 as WorldQuery>::State, <F5 as WorldQuery>::State)
State used to construct a
Self::Fetch
. This will be cached inside QueryState
,
so it is best to move as much data / computation here as possible to reduce the cost of
constructing Self::Fetch
. Read moresource§fn shrink<'wlong: 'wshort, 'wshort>(
item: Self::Item<'wlong>
) -> Self::Item<'wshort>
fn shrink<'wlong: 'wshort, 'wshort>(
item: Self::Item<'wlong>
) -> Self::Item<'wshort>
This function manually implements subtyping for the query items.
source§const IS_DENSE: bool = _
const IS_DENSE: bool = _
Returns true if (and only if) every table of every archetype matched by this fetch contains
all of the matched components. This is used to select a more efficient “table iterator”
for “dense” queries. If this returns true,
WorldQuery::set_table
must be used before
WorldQuery::fetch
can be called for iterators. If this returns false,
WorldQuery::set_archetype
must be used before WorldQuery::fetch
can be called for
iterators. Read moresource§const IS_ARCHETYPAL: bool = _
const IS_ARCHETYPAL: bool = _
Returns true if (and only if) this Fetch relies strictly on archetypes to limit which
components are accessed by the Query. Read more
source§unsafe fn init_fetch<'w>(
world: &'w World,
state: &Self::State,
last_change_tick: u32,
change_tick: u32
) -> Self::Fetch<'w>
unsafe fn init_fetch<'w>(
world: &'w World,
state: &Self::State,
last_change_tick: u32,
change_tick: u32
) -> Self::Fetch<'w>
Creates a new instance of this fetch. Read more
source§unsafe fn clone_fetch<'w>(fetch: &Self::Fetch<'w>) -> Self::Fetch<'w>
unsafe fn clone_fetch<'w>(fetch: &Self::Fetch<'w>) -> Self::Fetch<'w>
While this function can be called for any query, it is always safe to call if
Self: ReadOnlyWorldQuery
holds. Read moresource§unsafe fn set_table<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
table: &'w Table
)
unsafe fn set_table<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
table: &'w Table
)
Adjusts internal state to account for the next
Table
. This will always be called on tables
that match this WorldQuery
. Read moresource§unsafe fn set_archetype<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
archetype: &'w Archetype,
table: &'w Table
)
unsafe fn set_archetype<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
archetype: &'w Archetype,
table: &'w Table
)
Adjusts internal state to account for the next
Archetype
. This will always be called on
archetypes that match this WorldQuery
. Read moresource§unsafe fn fetch<'w>(
fetch: &mut Self::Fetch<'w>,
_entity: Entity,
_table_row: usize
) -> Self::Item<'w>
unsafe fn fetch<'w>(
fetch: &mut Self::Fetch<'w>,
_entity: Entity,
_table_row: usize
) -> Self::Item<'w>
Fetch
Self::Item
for either the given entity
in the current Table
,
or for the given entity
in the current Archetype
. This must always be called after
WorldQuery::set_table
with a table_row
in the range of the current Table
or after
WorldQuery::set_archetype
with a entity
in the current archetype. Read moresource§unsafe fn filter_fetch<'w>(
fetch: &mut Self::Fetch<'w>,
entity: Entity,
table_row: usize
) -> bool
unsafe fn filter_fetch<'w>(
fetch: &mut Self::Fetch<'w>,
entity: Entity,
table_row: usize
) -> bool
Safety Read more
fn update_component_access(
state: &Self::State,
access: &mut FilteredAccess<ComponentId>
)
fn update_archetype_component_access(
state: &Self::State,
archetype: &Archetype,
access: &mut Access<ArchetypeComponentId>
)
fn init_state(world: &mut World) -> Self::State
fn matches_component_set(
_state: &Self::State,
_set_contains_id: &impl Fn(ComponentId) -> bool
) -> bool
source§impl<F0: WorldQuery, F1: WorldQuery, F2: WorldQuery, F3: WorldQuery, F4: WorldQuery> WorldQuery for Or<(F0, F1, F2, F3, F4)>
impl<F0: WorldQuery, F1: WorldQuery, F2: WorldQuery, F3: WorldQuery, F4: WorldQuery> WorldQuery for Or<(F0, F1, F2, F3, F4)>
§type Fetch<'w> = (OrFetch<'w, F0>, OrFetch<'w, F1>, OrFetch<'w, F2>, OrFetch<'w, F3>, OrFetch<'w, F4>)
type Fetch<'w> = (OrFetch<'w, F0>, OrFetch<'w, F1>, OrFetch<'w, F2>, OrFetch<'w, F3>, OrFetch<'w, F4>)
Per archetype/table state used by this
WorldQuery
to fetch Self::Item
§type Item<'w> = bool
type Item<'w> = bool
The item returned by this
WorldQuery
§type ReadOnly = Or<(<F0 as WorldQuery>::ReadOnly, <F1 as WorldQuery>::ReadOnly, <F2 as WorldQuery>::ReadOnly, <F3 as WorldQuery>::ReadOnly, <F4 as WorldQuery>::ReadOnly)>
type ReadOnly = Or<(<F0 as WorldQuery>::ReadOnly, <F1 as WorldQuery>::ReadOnly, <F2 as WorldQuery>::ReadOnly, <F3 as WorldQuery>::ReadOnly, <F4 as WorldQuery>::ReadOnly)>
The read-only variant of this
WorldQuery
, which satisfies the ReadOnlyWorldQuery
trait.§type State = (<F0 as WorldQuery>::State, <F1 as WorldQuery>::State, <F2 as WorldQuery>::State, <F3 as WorldQuery>::State, <F4 as WorldQuery>::State)
type State = (<F0 as WorldQuery>::State, <F1 as WorldQuery>::State, <F2 as WorldQuery>::State, <F3 as WorldQuery>::State, <F4 as WorldQuery>::State)
State used to construct a
Self::Fetch
. This will be cached inside QueryState
,
so it is best to move as much data / computation here as possible to reduce the cost of
constructing Self::Fetch
. Read moresource§fn shrink<'wlong: 'wshort, 'wshort>(
item: Self::Item<'wlong>
) -> Self::Item<'wshort>
fn shrink<'wlong: 'wshort, 'wshort>(
item: Self::Item<'wlong>
) -> Self::Item<'wshort>
This function manually implements subtyping for the query items.
source§const IS_DENSE: bool = _
const IS_DENSE: bool = _
Returns true if (and only if) every table of every archetype matched by this fetch contains
all of the matched components. This is used to select a more efficient “table iterator”
for “dense” queries. If this returns true,
WorldQuery::set_table
must be used before
WorldQuery::fetch
can be called for iterators. If this returns false,
WorldQuery::set_archetype
must be used before WorldQuery::fetch
can be called for
iterators. Read moresource§const IS_ARCHETYPAL: bool = _
const IS_ARCHETYPAL: bool = _
Returns true if (and only if) this Fetch relies strictly on archetypes to limit which
components are accessed by the Query. Read more
source§unsafe fn init_fetch<'w>(
world: &'w World,
state: &Self::State,
last_change_tick: u32,
change_tick: u32
) -> Self::Fetch<'w>
unsafe fn init_fetch<'w>(
world: &'w World,
state: &Self::State,
last_change_tick: u32,
change_tick: u32
) -> Self::Fetch<'w>
Creates a new instance of this fetch. Read more
source§unsafe fn clone_fetch<'w>(fetch: &Self::Fetch<'w>) -> Self::Fetch<'w>
unsafe fn clone_fetch<'w>(fetch: &Self::Fetch<'w>) -> Self::Fetch<'w>
While this function can be called for any query, it is always safe to call if
Self: ReadOnlyWorldQuery
holds. Read moresource§unsafe fn set_table<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
table: &'w Table
)
unsafe fn set_table<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
table: &'w Table
)
Adjusts internal state to account for the next
Table
. This will always be called on tables
that match this WorldQuery
. Read moresource§unsafe fn set_archetype<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
archetype: &'w Archetype,
table: &'w Table
)
unsafe fn set_archetype<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
archetype: &'w Archetype,
table: &'w Table
)
Adjusts internal state to account for the next
Archetype
. This will always be called on
archetypes that match this WorldQuery
. Read moresource§unsafe fn fetch<'w>(
fetch: &mut Self::Fetch<'w>,
_entity: Entity,
_table_row: usize
) -> Self::Item<'w>
unsafe fn fetch<'w>(
fetch: &mut Self::Fetch<'w>,
_entity: Entity,
_table_row: usize
) -> Self::Item<'w>
Fetch
Self::Item
for either the given entity
in the current Table
,
or for the given entity
in the current Archetype
. This must always be called after
WorldQuery::set_table
with a table_row
in the range of the current Table
or after
WorldQuery::set_archetype
with a entity
in the current archetype. Read moresource§unsafe fn filter_fetch<'w>(
fetch: &mut Self::Fetch<'w>,
entity: Entity,
table_row: usize
) -> bool
unsafe fn filter_fetch<'w>(
fetch: &mut Self::Fetch<'w>,
entity: Entity,
table_row: usize
) -> bool
Safety Read more
fn update_component_access(
state: &Self::State,
access: &mut FilteredAccess<ComponentId>
)
fn update_archetype_component_access(
state: &Self::State,
archetype: &Archetype,
access: &mut Access<ArchetypeComponentId>
)
fn init_state(world: &mut World) -> Self::State
fn matches_component_set(
_state: &Self::State,
_set_contains_id: &impl Fn(ComponentId) -> bool
) -> bool
source§impl<F0: WorldQuery, F1: WorldQuery, F2: WorldQuery, F3: WorldQuery> WorldQuery for Or<(F0, F1, F2, F3)>
impl<F0: WorldQuery, F1: WorldQuery, F2: WorldQuery, F3: WorldQuery> WorldQuery for Or<(F0, F1, F2, F3)>
§type Fetch<'w> = (OrFetch<'w, F0>, OrFetch<'w, F1>, OrFetch<'w, F2>, OrFetch<'w, F3>)
type Fetch<'w> = (OrFetch<'w, F0>, OrFetch<'w, F1>, OrFetch<'w, F2>, OrFetch<'w, F3>)
Per archetype/table state used by this
WorldQuery
to fetch Self::Item
§type Item<'w> = bool
type Item<'w> = bool
The item returned by this
WorldQuery
§type ReadOnly = Or<(<F0 as WorldQuery>::ReadOnly, <F1 as WorldQuery>::ReadOnly, <F2 as WorldQuery>::ReadOnly, <F3 as WorldQuery>::ReadOnly)>
type ReadOnly = Or<(<F0 as WorldQuery>::ReadOnly, <F1 as WorldQuery>::ReadOnly, <F2 as WorldQuery>::ReadOnly, <F3 as WorldQuery>::ReadOnly)>
The read-only variant of this
WorldQuery
, which satisfies the ReadOnlyWorldQuery
trait.§type State = (<F0 as WorldQuery>::State, <F1 as WorldQuery>::State, <F2 as WorldQuery>::State, <F3 as WorldQuery>::State)
type State = (<F0 as WorldQuery>::State, <F1 as WorldQuery>::State, <F2 as WorldQuery>::State, <F3 as WorldQuery>::State)
State used to construct a
Self::Fetch
. This will be cached inside QueryState
,
so it is best to move as much data / computation here as possible to reduce the cost of
constructing Self::Fetch
. Read moresource§fn shrink<'wlong: 'wshort, 'wshort>(
item: Self::Item<'wlong>
) -> Self::Item<'wshort>
fn shrink<'wlong: 'wshort, 'wshort>(
item: Self::Item<'wlong>
) -> Self::Item<'wshort>
This function manually implements subtyping for the query items.
source§const IS_DENSE: bool = _
const IS_DENSE: bool = _
Returns true if (and only if) every table of every archetype matched by this fetch contains
all of the matched components. This is used to select a more efficient “table iterator”
for “dense” queries. If this returns true,
WorldQuery::set_table
must be used before
WorldQuery::fetch
can be called for iterators. If this returns false,
WorldQuery::set_archetype
must be used before WorldQuery::fetch
can be called for
iterators. Read moresource§const IS_ARCHETYPAL: bool = _
const IS_ARCHETYPAL: bool = _
Returns true if (and only if) this Fetch relies strictly on archetypes to limit which
components are accessed by the Query. Read more
source§unsafe fn init_fetch<'w>(
world: &'w World,
state: &Self::State,
last_change_tick: u32,
change_tick: u32
) -> Self::Fetch<'w>
unsafe fn init_fetch<'w>(
world: &'w World,
state: &Self::State,
last_change_tick: u32,
change_tick: u32
) -> Self::Fetch<'w>
Creates a new instance of this fetch. Read more
source§unsafe fn clone_fetch<'w>(fetch: &Self::Fetch<'w>) -> Self::Fetch<'w>
unsafe fn clone_fetch<'w>(fetch: &Self::Fetch<'w>) -> Self::Fetch<'w>
While this function can be called for any query, it is always safe to call if
Self: ReadOnlyWorldQuery
holds. Read moresource§unsafe fn set_table<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
table: &'w Table
)
unsafe fn set_table<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
table: &'w Table
)
Adjusts internal state to account for the next
Table
. This will always be called on tables
that match this WorldQuery
. Read moresource§unsafe fn set_archetype<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
archetype: &'w Archetype,
table: &'w Table
)
unsafe fn set_archetype<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
archetype: &'w Archetype,
table: &'w Table
)
Adjusts internal state to account for the next
Archetype
. This will always be called on
archetypes that match this WorldQuery
. Read moresource§unsafe fn fetch<'w>(
fetch: &mut Self::Fetch<'w>,
_entity: Entity,
_table_row: usize
) -> Self::Item<'w>
unsafe fn fetch<'w>(
fetch: &mut Self::Fetch<'w>,
_entity: Entity,
_table_row: usize
) -> Self::Item<'w>
Fetch
Self::Item
for either the given entity
in the current Table
,
or for the given entity
in the current Archetype
. This must always be called after
WorldQuery::set_table
with a table_row
in the range of the current Table
or after
WorldQuery::set_archetype
with a entity
in the current archetype. Read moresource§unsafe fn filter_fetch<'w>(
fetch: &mut Self::Fetch<'w>,
entity: Entity,
table_row: usize
) -> bool
unsafe fn filter_fetch<'w>(
fetch: &mut Self::Fetch<'w>,
entity: Entity,
table_row: usize
) -> bool
Safety Read more
fn update_component_access(
state: &Self::State,
access: &mut FilteredAccess<ComponentId>
)
fn update_archetype_component_access(
state: &Self::State,
archetype: &Archetype,
access: &mut Access<ArchetypeComponentId>
)
fn init_state(world: &mut World) -> Self::State
fn matches_component_set(
_state: &Self::State,
_set_contains_id: &impl Fn(ComponentId) -> bool
) -> bool
source§impl<F0: WorldQuery, F1: WorldQuery, F2: WorldQuery> WorldQuery for Or<(F0, F1, F2)>
impl<F0: WorldQuery, F1: WorldQuery, F2: WorldQuery> WorldQuery for Or<(F0, F1, F2)>
§type Fetch<'w> = (OrFetch<'w, F0>, OrFetch<'w, F1>, OrFetch<'w, F2>)
type Fetch<'w> = (OrFetch<'w, F0>, OrFetch<'w, F1>, OrFetch<'w, F2>)
Per archetype/table state used by this
WorldQuery
to fetch Self::Item
§type Item<'w> = bool
type Item<'w> = bool
The item returned by this
WorldQuery
§type ReadOnly = Or<(<F0 as WorldQuery>::ReadOnly, <F1 as WorldQuery>::ReadOnly, <F2 as WorldQuery>::ReadOnly)>
type ReadOnly = Or<(<F0 as WorldQuery>::ReadOnly, <F1 as WorldQuery>::ReadOnly, <F2 as WorldQuery>::ReadOnly)>
The read-only variant of this
WorldQuery
, which satisfies the ReadOnlyWorldQuery
trait.§type State = (<F0 as WorldQuery>::State, <F1 as WorldQuery>::State, <F2 as WorldQuery>::State)
type State = (<F0 as WorldQuery>::State, <F1 as WorldQuery>::State, <F2 as WorldQuery>::State)
State used to construct a
Self::Fetch
. This will be cached inside QueryState
,
so it is best to move as much data / computation here as possible to reduce the cost of
constructing Self::Fetch
. Read moresource§fn shrink<'wlong: 'wshort, 'wshort>(
item: Self::Item<'wlong>
) -> Self::Item<'wshort>
fn shrink<'wlong: 'wshort, 'wshort>(
item: Self::Item<'wlong>
) -> Self::Item<'wshort>
This function manually implements subtyping for the query items.
source§const IS_DENSE: bool = _
const IS_DENSE: bool = _
Returns true if (and only if) every table of every archetype matched by this fetch contains
all of the matched components. This is used to select a more efficient “table iterator”
for “dense” queries. If this returns true,
WorldQuery::set_table
must be used before
WorldQuery::fetch
can be called for iterators. If this returns false,
WorldQuery::set_archetype
must be used before WorldQuery::fetch
can be called for
iterators. Read moresource§const IS_ARCHETYPAL: bool = _
const IS_ARCHETYPAL: bool = _
Returns true if (and only if) this Fetch relies strictly on archetypes to limit which
components are accessed by the Query. Read more
source§unsafe fn init_fetch<'w>(
world: &'w World,
state: &Self::State,
last_change_tick: u32,
change_tick: u32
) -> Self::Fetch<'w>
unsafe fn init_fetch<'w>(
world: &'w World,
state: &Self::State,
last_change_tick: u32,
change_tick: u32
) -> Self::Fetch<'w>
Creates a new instance of this fetch. Read more
source§unsafe fn clone_fetch<'w>(fetch: &Self::Fetch<'w>) -> Self::Fetch<'w>
unsafe fn clone_fetch<'w>(fetch: &Self::Fetch<'w>) -> Self::Fetch<'w>
While this function can be called for any query, it is always safe to call if
Self: ReadOnlyWorldQuery
holds. Read moresource§unsafe fn set_table<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
table: &'w Table
)
unsafe fn set_table<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
table: &'w Table
)
Adjusts internal state to account for the next
Table
. This will always be called on tables
that match this WorldQuery
. Read moresource§unsafe fn set_archetype<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
archetype: &'w Archetype,
table: &'w Table
)
unsafe fn set_archetype<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
archetype: &'w Archetype,
table: &'w Table
)
Adjusts internal state to account for the next
Archetype
. This will always be called on
archetypes that match this WorldQuery
. Read moresource§unsafe fn fetch<'w>(
fetch: &mut Self::Fetch<'w>,
_entity: Entity,
_table_row: usize
) -> Self::Item<'w>
unsafe fn fetch<'w>(
fetch: &mut Self::Fetch<'w>,
_entity: Entity,
_table_row: usize
) -> Self::Item<'w>
Fetch
Self::Item
for either the given entity
in the current Table
,
or for the given entity
in the current Archetype
. This must always be called after
WorldQuery::set_table
with a table_row
in the range of the current Table
or after
WorldQuery::set_archetype
with a entity
in the current archetype. Read moresource§unsafe fn filter_fetch<'w>(
fetch: &mut Self::Fetch<'w>,
entity: Entity,
table_row: usize
) -> bool
unsafe fn filter_fetch<'w>(
fetch: &mut Self::Fetch<'w>,
entity: Entity,
table_row: usize
) -> bool
Safety Read more
fn update_component_access(
state: &Self::State,
access: &mut FilteredAccess<ComponentId>
)
fn update_archetype_component_access(
state: &Self::State,
archetype: &Archetype,
access: &mut Access<ArchetypeComponentId>
)
fn init_state(world: &mut World) -> Self::State
fn matches_component_set(
_state: &Self::State,
_set_contains_id: &impl Fn(ComponentId) -> bool
) -> bool
source§impl<F0: WorldQuery, F1: WorldQuery> WorldQuery for Or<(F0, F1)>
impl<F0: WorldQuery, F1: WorldQuery> WorldQuery for Or<(F0, F1)>
§type Fetch<'w> = (OrFetch<'w, F0>, OrFetch<'w, F1>)
type Fetch<'w> = (OrFetch<'w, F0>, OrFetch<'w, F1>)
Per archetype/table state used by this
WorldQuery
to fetch Self::Item
§type Item<'w> = bool
type Item<'w> = bool
The item returned by this
WorldQuery
§type ReadOnly = Or<(<F0 as WorldQuery>::ReadOnly, <F1 as WorldQuery>::ReadOnly)>
type ReadOnly = Or<(<F0 as WorldQuery>::ReadOnly, <F1 as WorldQuery>::ReadOnly)>
The read-only variant of this
WorldQuery
, which satisfies the ReadOnlyWorldQuery
trait.§type State = (<F0 as WorldQuery>::State, <F1 as WorldQuery>::State)
type State = (<F0 as WorldQuery>::State, <F1 as WorldQuery>::State)
State used to construct a
Self::Fetch
. This will be cached inside QueryState
,
so it is best to move as much data / computation here as possible to reduce the cost of
constructing Self::Fetch
. Read moresource§fn shrink<'wlong: 'wshort, 'wshort>(
item: Self::Item<'wlong>
) -> Self::Item<'wshort>
fn shrink<'wlong: 'wshort, 'wshort>(
item: Self::Item<'wlong>
) -> Self::Item<'wshort>
This function manually implements subtyping for the query items.
source§const IS_DENSE: bool = _
const IS_DENSE: bool = _
Returns true if (and only if) every table of every archetype matched by this fetch contains
all of the matched components. This is used to select a more efficient “table iterator”
for “dense” queries. If this returns true,
WorldQuery::set_table
must be used before
WorldQuery::fetch
can be called for iterators. If this returns false,
WorldQuery::set_archetype
must be used before WorldQuery::fetch
can be called for
iterators. Read moresource§const IS_ARCHETYPAL: bool = _
const IS_ARCHETYPAL: bool = _
Returns true if (and only if) this Fetch relies strictly on archetypes to limit which
components are accessed by the Query. Read more
source§unsafe fn init_fetch<'w>(
world: &'w World,
state: &Self::State,
last_change_tick: u32,
change_tick: u32
) -> Self::Fetch<'w>
unsafe fn init_fetch<'w>(
world: &'w World,
state: &Self::State,
last_change_tick: u32,
change_tick: u32
) -> Self::Fetch<'w>
Creates a new instance of this fetch. Read more
source§unsafe fn clone_fetch<'w>(fetch: &Self::Fetch<'w>) -> Self::Fetch<'w>
unsafe fn clone_fetch<'w>(fetch: &Self::Fetch<'w>) -> Self::Fetch<'w>
While this function can be called for any query, it is always safe to call if
Self: ReadOnlyWorldQuery
holds. Read moresource§unsafe fn set_table<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
table: &'w Table
)
unsafe fn set_table<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
table: &'w Table
)
Adjusts internal state to account for the next
Table
. This will always be called on tables
that match this WorldQuery
. Read moresource§unsafe fn set_archetype<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
archetype: &'w Archetype,
table: &'w Table
)
unsafe fn set_archetype<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
archetype: &'w Archetype,
table: &'w Table
)
Adjusts internal state to account for the next
Archetype
. This will always be called on
archetypes that match this WorldQuery
. Read moresource§unsafe fn fetch<'w>(
fetch: &mut Self::Fetch<'w>,
_entity: Entity,
_table_row: usize
) -> Self::Item<'w>
unsafe fn fetch<'w>(
fetch: &mut Self::Fetch<'w>,
_entity: Entity,
_table_row: usize
) -> Self::Item<'w>
Fetch
Self::Item
for either the given entity
in the current Table
,
or for the given entity
in the current Archetype
. This must always be called after
WorldQuery::set_table
with a table_row
in the range of the current Table
or after
WorldQuery::set_archetype
with a entity
in the current archetype. Read moresource§unsafe fn filter_fetch<'w>(
fetch: &mut Self::Fetch<'w>,
entity: Entity,
table_row: usize
) -> bool
unsafe fn filter_fetch<'w>(
fetch: &mut Self::Fetch<'w>,
entity: Entity,
table_row: usize
) -> bool
Safety Read more
fn update_component_access(
state: &Self::State,
access: &mut FilteredAccess<ComponentId>
)
fn update_archetype_component_access(
state: &Self::State,
archetype: &Archetype,
access: &mut Access<ArchetypeComponentId>
)
fn init_state(world: &mut World) -> Self::State
fn matches_component_set(
_state: &Self::State,
_set_contains_id: &impl Fn(ComponentId) -> bool
) -> bool
source§impl<F0: WorldQuery> WorldQuery for Or<(F0,)>
impl<F0: WorldQuery> WorldQuery for Or<(F0,)>
§type Fetch<'w> = (OrFetch<'w, F0>,)
type Fetch<'w> = (OrFetch<'w, F0>,)
Per archetype/table state used by this
WorldQuery
to fetch Self::Item
§type Item<'w> = bool
type Item<'w> = bool
The item returned by this
WorldQuery
§type ReadOnly = Or<(<F0 as WorldQuery>::ReadOnly,)>
type ReadOnly = Or<(<F0 as WorldQuery>::ReadOnly,)>
The read-only variant of this
WorldQuery
, which satisfies the ReadOnlyWorldQuery
trait.§type State = (<F0 as WorldQuery>::State,)
type State = (<F0 as WorldQuery>::State,)
State used to construct a
Self::Fetch
. This will be cached inside QueryState
,
so it is best to move as much data / computation here as possible to reduce the cost of
constructing Self::Fetch
. Read moresource§fn shrink<'wlong: 'wshort, 'wshort>(
item: Self::Item<'wlong>
) -> Self::Item<'wshort>
fn shrink<'wlong: 'wshort, 'wshort>(
item: Self::Item<'wlong>
) -> Self::Item<'wshort>
This function manually implements subtyping for the query items.
source§const IS_DENSE: bool = _
const IS_DENSE: bool = _
Returns true if (and only if) every table of every archetype matched by this fetch contains
all of the matched components. This is used to select a more efficient “table iterator”
for “dense” queries. If this returns true,
WorldQuery::set_table
must be used before
WorldQuery::fetch
can be called for iterators. If this returns false,
WorldQuery::set_archetype
must be used before WorldQuery::fetch
can be called for
iterators. Read moresource§const IS_ARCHETYPAL: bool = _
const IS_ARCHETYPAL: bool = _
Returns true if (and only if) this Fetch relies strictly on archetypes to limit which
components are accessed by the Query. Read more
source§unsafe fn init_fetch<'w>(
world: &'w World,
state: &Self::State,
last_change_tick: u32,
change_tick: u32
) -> Self::Fetch<'w>
unsafe fn init_fetch<'w>(
world: &'w World,
state: &Self::State,
last_change_tick: u32,
change_tick: u32
) -> Self::Fetch<'w>
Creates a new instance of this fetch. Read more
source§unsafe fn clone_fetch<'w>(fetch: &Self::Fetch<'w>) -> Self::Fetch<'w>
unsafe fn clone_fetch<'w>(fetch: &Self::Fetch<'w>) -> Self::Fetch<'w>
While this function can be called for any query, it is always safe to call if
Self: ReadOnlyWorldQuery
holds. Read moresource§unsafe fn set_table<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
table: &'w Table
)
unsafe fn set_table<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
table: &'w Table
)
Adjusts internal state to account for the next
Table
. This will always be called on tables
that match this WorldQuery
. Read moresource§unsafe fn set_archetype<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
archetype: &'w Archetype,
table: &'w Table
)
unsafe fn set_archetype<'w>(
fetch: &mut Self::Fetch<'w>,
state: &Self::State,
archetype: &'w Archetype,
table: &'w Table
)
Adjusts internal state to account for the next
Archetype
. This will always be called on
archetypes that match this WorldQuery
. Read moresource§unsafe fn fetch<'w>(
fetch: &mut Self::Fetch<'w>,
_entity: Entity,
_table_row: usize
) -> Self::Item<'w>
unsafe fn fetch<'w>(
fetch: &mut Self::Fetch<'w>,
_entity: Entity,
_table_row: usize
) -> Self::Item<'w>
Fetch
Self::Item
for either the given entity
in the current Table
,
or for the given entity
in the current Archetype
. This must always be called after
WorldQuery::set_table
with a table_row
in the range of the current Table
or after
WorldQuery::set_archetype
with a entity
in the current archetype. Read moresource§unsafe fn filter_fetch<'w>(
fetch: &mut Self::Fetch<'w>,
entity: Entity,
table_row: usize
) -> bool
unsafe fn filter_fetch<'w>(
fetch: &mut Self::Fetch<'w>,
entity: Entity,
table_row: usize
) -> bool
Safety Read more
fn update_component_access(
state: &Self::State,
access: &mut FilteredAccess<ComponentId>
)
fn update_archetype_component_access(
state: &Self::State,
archetype: &Archetype,
access: &mut Access<ArchetypeComponentId>
)
fn init_state(world: &mut World) -> Self::State
fn matches_component_set(
_state: &Self::State,
_set_contains_id: &impl Fn(ComponentId) -> bool
) -> bool
impl ArchetypeFilter for Or<()>
impl<F0: ArchetypeFilter, F1: ArchetypeFilter, F2: ArchetypeFilter, F3: ArchetypeFilter, F4: ArchetypeFilter, F5: ArchetypeFilter, F6: ArchetypeFilter, F7: ArchetypeFilter, F8: ArchetypeFilter, F9: ArchetypeFilter, F10: ArchetypeFilter, F11: ArchetypeFilter, F12: ArchetypeFilter, F13: ArchetypeFilter, F14: ArchetypeFilter> ArchetypeFilter for Or<(F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14)>
impl<F0: ArchetypeFilter, F1: ArchetypeFilter, F2: ArchetypeFilter, F3: ArchetypeFilter, F4: ArchetypeFilter, F5: ArchetypeFilter, F6: ArchetypeFilter, F7: ArchetypeFilter, F8: ArchetypeFilter, F9: ArchetypeFilter, F10: ArchetypeFilter, F11: ArchetypeFilter, F12: ArchetypeFilter, F13: ArchetypeFilter> ArchetypeFilter for Or<(F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13)>
impl<F0: ArchetypeFilter, F1: ArchetypeFilter, F2: ArchetypeFilter, F3: ArchetypeFilter, F4: ArchetypeFilter, F5: ArchetypeFilter, F6: ArchetypeFilter, F7: ArchetypeFilter, F8: ArchetypeFilter, F9: ArchetypeFilter, F10: ArchetypeFilter, F11: ArchetypeFilter, F12: ArchetypeFilter> ArchetypeFilter for Or<(F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12)>
impl<F0: ArchetypeFilter, F1: ArchetypeFilter, F2: ArchetypeFilter, F3: ArchetypeFilter, F4: ArchetypeFilter, F5: ArchetypeFilter, F6: ArchetypeFilter, F7: ArchetypeFilter, F8: ArchetypeFilter, F9: ArchetypeFilter, F10: ArchetypeFilter, F11: ArchetypeFilter> ArchetypeFilter for Or<(F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11)>
impl<F0: ArchetypeFilter, F1: ArchetypeFilter, F2: ArchetypeFilter, F3: ArchetypeFilter, F4: ArchetypeFilter, F5: ArchetypeFilter, F6: ArchetypeFilter, F7: ArchetypeFilter, F8: ArchetypeFilter, F9: ArchetypeFilter, F10: ArchetypeFilter> ArchetypeFilter for Or<(F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10)>
impl<F0: ArchetypeFilter, F1: ArchetypeFilter, F2: ArchetypeFilter, F3: ArchetypeFilter, F4: ArchetypeFilter, F5: ArchetypeFilter, F6: ArchetypeFilter, F7: ArchetypeFilter, F8: ArchetypeFilter, F9: ArchetypeFilter> ArchetypeFilter for Or<(F0, F1, F2, F3, F4, F5, F6, F7, F8, F9)>
impl<F0: ArchetypeFilter, F1: ArchetypeFilter, F2: ArchetypeFilter, F3: ArchetypeFilter, F4: ArchetypeFilter, F5: ArchetypeFilter, F6: ArchetypeFilter, F7: ArchetypeFilter, F8: ArchetypeFilter> ArchetypeFilter for Or<(F0, F1, F2, F3, F4, F5, F6, F7, F8)>
impl<F0: ArchetypeFilter, F1: ArchetypeFilter, F2: ArchetypeFilter, F3: ArchetypeFilter, F4: ArchetypeFilter, F5: ArchetypeFilter, F6: ArchetypeFilter, F7: ArchetypeFilter> ArchetypeFilter for Or<(F0, F1, F2, F3, F4, F5, F6, F7)>
impl<F0: ArchetypeFilter, F1: ArchetypeFilter, F2: ArchetypeFilter, F3: ArchetypeFilter, F4: ArchetypeFilter, F5: ArchetypeFilter, F6: ArchetypeFilter> ArchetypeFilter for Or<(F0, F1, F2, F3, F4, F5, F6)>
impl<F0: ArchetypeFilter, F1: ArchetypeFilter, F2: ArchetypeFilter, F3: ArchetypeFilter, F4: ArchetypeFilter, F5: ArchetypeFilter> ArchetypeFilter for Or<(F0, F1, F2, F3, F4, F5)>
impl<F0: ArchetypeFilter, F1: ArchetypeFilter, F2: ArchetypeFilter, F3: ArchetypeFilter, F4: ArchetypeFilter> ArchetypeFilter for Or<(F0, F1, F2, F3, F4)>
impl<F0: ArchetypeFilter, F1: ArchetypeFilter, F2: ArchetypeFilter, F3: ArchetypeFilter> ArchetypeFilter for Or<(F0, F1, F2, F3)>
impl<F0: ArchetypeFilter, F1: ArchetypeFilter, F2: ArchetypeFilter> ArchetypeFilter for Or<(F0, F1, F2)>
impl<F0: ArchetypeFilter, F1: ArchetypeFilter> ArchetypeFilter for Or<(F0, F1)>
impl<F0: ArchetypeFilter> ArchetypeFilter for Or<(F0,)>
impl ReadOnlyWorldQuery for Or<()>
impl<F0: ReadOnlyWorldQuery, F1: ReadOnlyWorldQuery, F2: ReadOnlyWorldQuery, F3: ReadOnlyWorldQuery, F4: ReadOnlyWorldQuery, F5: ReadOnlyWorldQuery, F6: ReadOnlyWorldQuery, F7: ReadOnlyWorldQuery, F8: ReadOnlyWorldQuery, F9: ReadOnlyWorldQuery, F10: ReadOnlyWorldQuery, F11: ReadOnlyWorldQuery, F12: ReadOnlyWorldQuery, F13: ReadOnlyWorldQuery, F14: ReadOnlyWorldQuery> ReadOnlyWorldQuery for Or<(F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14)>
impl<F0: ReadOnlyWorldQuery, F1: ReadOnlyWorldQuery, F2: ReadOnlyWorldQuery, F3: ReadOnlyWorldQuery, F4: ReadOnlyWorldQuery, F5: ReadOnlyWorldQuery, F6: ReadOnlyWorldQuery, F7: ReadOnlyWorldQuery, F8: ReadOnlyWorldQuery, F9: ReadOnlyWorldQuery, F10: ReadOnlyWorldQuery, F11: ReadOnlyWorldQuery, F12: ReadOnlyWorldQuery, F13: ReadOnlyWorldQuery> ReadOnlyWorldQuery for Or<(F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13)>
impl<F0: ReadOnlyWorldQuery, F1: ReadOnlyWorldQuery, F2: ReadOnlyWorldQuery, F3: ReadOnlyWorldQuery, F4: ReadOnlyWorldQuery, F5: ReadOnlyWorldQuery, F6: ReadOnlyWorldQuery, F7: ReadOnlyWorldQuery, F8: ReadOnlyWorldQuery, F9: ReadOnlyWorldQuery, F10: ReadOnlyWorldQuery, F11: ReadOnlyWorldQuery, F12: ReadOnlyWorldQuery> ReadOnlyWorldQuery for Or<(F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12)>
impl<F0: ReadOnlyWorldQuery, F1: ReadOnlyWorldQuery, F2: ReadOnlyWorldQuery, F3: ReadOnlyWorldQuery, F4: ReadOnlyWorldQuery, F5: ReadOnlyWorldQuery, F6: ReadOnlyWorldQuery, F7: ReadOnlyWorldQuery, F8: ReadOnlyWorldQuery, F9: ReadOnlyWorldQuery, F10: ReadOnlyWorldQuery, F11: ReadOnlyWorldQuery> ReadOnlyWorldQuery for Or<(F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11)>
impl<F0: ReadOnlyWorldQuery, F1: ReadOnlyWorldQuery, F2: ReadOnlyWorldQuery, F3: ReadOnlyWorldQuery, F4: ReadOnlyWorldQuery, F5: ReadOnlyWorldQuery, F6: ReadOnlyWorldQuery, F7: ReadOnlyWorldQuery, F8: ReadOnlyWorldQuery, F9: ReadOnlyWorldQuery, F10: ReadOnlyWorldQuery> ReadOnlyWorldQuery for Or<(F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10)>
impl<F0: ReadOnlyWorldQuery, F1: ReadOnlyWorldQuery, F2: ReadOnlyWorldQuery, F3: ReadOnlyWorldQuery, F4: ReadOnlyWorldQuery, F5: ReadOnlyWorldQuery, F6: ReadOnlyWorldQuery, F7: ReadOnlyWorldQuery, F8: ReadOnlyWorldQuery, F9: ReadOnlyWorldQuery> ReadOnlyWorldQuery for Or<(F0, F1, F2, F3, F4, F5, F6, F7, F8, F9)>
impl<F0: ReadOnlyWorldQuery, F1: ReadOnlyWorldQuery, F2: ReadOnlyWorldQuery, F3: ReadOnlyWorldQuery, F4: ReadOnlyWorldQuery, F5: ReadOnlyWorldQuery, F6: ReadOnlyWorldQuery, F7: ReadOnlyWorldQuery, F8: ReadOnlyWorldQuery> ReadOnlyWorldQuery for Or<(F0, F1, F2, F3, F4, F5, F6, F7, F8)>
impl<F0: ReadOnlyWorldQuery, F1: ReadOnlyWorldQuery, F2: ReadOnlyWorldQuery, F3: ReadOnlyWorldQuery, F4: ReadOnlyWorldQuery, F5: ReadOnlyWorldQuery, F6: ReadOnlyWorldQuery, F7: ReadOnlyWorldQuery> ReadOnlyWorldQuery for Or<(F0, F1, F2, F3, F4, F5, F6, F7)>
impl<F0: ReadOnlyWorldQuery, F1: ReadOnlyWorldQuery, F2: ReadOnlyWorldQuery, F3: ReadOnlyWorldQuery, F4: ReadOnlyWorldQuery, F5: ReadOnlyWorldQuery, F6: ReadOnlyWorldQuery> ReadOnlyWorldQuery for Or<(F0, F1, F2, F3, F4, F5, F6)>
impl<F0: ReadOnlyWorldQuery, F1: ReadOnlyWorldQuery, F2: ReadOnlyWorldQuery, F3: ReadOnlyWorldQuery, F4: ReadOnlyWorldQuery, F5: ReadOnlyWorldQuery> ReadOnlyWorldQuery for Or<(F0, F1, F2, F3, F4, F5)>
impl<F0: ReadOnlyWorldQuery, F1: ReadOnlyWorldQuery, F2: ReadOnlyWorldQuery, F3: ReadOnlyWorldQuery, F4: ReadOnlyWorldQuery> ReadOnlyWorldQuery for Or<(F0, F1, F2, F3, F4)>
impl<F0: ReadOnlyWorldQuery, F1: ReadOnlyWorldQuery, F2: ReadOnlyWorldQuery, F3: ReadOnlyWorldQuery> ReadOnlyWorldQuery for Or<(F0, F1, F2, F3)>
impl<F0: ReadOnlyWorldQuery, F1: ReadOnlyWorldQuery, F2: ReadOnlyWorldQuery> ReadOnlyWorldQuery for Or<(F0, F1, F2)>
impl<F0: ReadOnlyWorldQuery, F1: ReadOnlyWorldQuery> ReadOnlyWorldQuery for Or<(F0, F1)>
impl<F0: ReadOnlyWorldQuery> ReadOnlyWorldQuery for Or<(F0,)>
Auto Trait Implementations§
impl<T> RefUnwindSafe for Or<T>where
T: RefUnwindSafe,
impl<T> Send for Or<T>where
T: Send,
impl<T> Sync for Or<T>where
T: Sync,
impl<T> Unpin for Or<T>where
T: Unpin,
impl<T> UnwindSafe for Or<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read moresource§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read moresource§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read moresource§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more