Module query

Source
Expand description

Contains APIs for retrieving component data from the world.

Structs§

Access
Tracks read and write access to specific elements in a collection.
Added
A filter on a component that only retains results the first time after they have been added.
AnyOf
The AnyOf query parameter fetches entities with any of the component types included in T.
Changed
A filter on a component that only retains results the first time after they have been added or mutably dereferenced.
FilteredAccess
An Access that has been filtered to include and exclude certain combinations of elements.
FilteredAccessSet
A collection of FilteredAccess instances.
Has
Returns a bool that describes if an entity has the component T.
Or
A filter that tests if any of the given filters apply.
QueryBuilder
Builder struct to create QueryState instances at runtime.
QueryCombinationIter
An iterator over K-sized combinations of query items without repetition.
QueryIter
An Iterator over query results of a Query.
QueryManyIter
An Iterator over the query items generated from an iterator of Entitys.
QueryParIter
A parallel iterator over query results of a Query.
QuerySortedIter
An Iterator over sorted query results of a Query.
QueryState
Provides scoped access to a World state according to a given QueryData and QueryFilter.
ReadFetch
The WorldQuery::Fetch type for & T.
With
Filter that selects entities with a component T.
Without
Filter that selects entities without a component T.
WriteFetch
The WorldQuery::Fetch type for &mut T.

Enums§

AccessConflicts
Records how two accesses conflict with each other
QueryEntityError
An error that occurs when retrieving a specific Entity’s query result from Query or QueryState.
QuerySingleError
An error that occurs when evaluating a Query or QueryState as a single expected result via get_single or get_single_mut.

Traits§

ArchetypeFilter
A marker trait to indicate that the filter works at an archetype level.
QueryData
Types that can be fetched from a World using a Query.
QueryFilter
Types that filter the results of a Query.
ReadOnlyQueryData
A QueryData that is read only.
WorldQuery
Types that can be used as parameters in a Query. Types that implement this should also implement either QueryData or QueryFilter

Type Aliases§

QueryItem
The item type returned when a WorldQuery is iterated over
ROQueryItem
The read-only variant of the item type returned when a QueryData is iterated over immutably

Derive Macros§

QueryData
Implement QueryData to use a struct as a data parameter in a query
QueryFilter
Implement QueryFilter to use a struct as a filter parameter in a query