pub trait WorldQuery {
type Item<'w>;
// Required methods
fn fetch(world: &World, id: EntityId) -> Option<Self::Item<'_>>;
fn contains(world: &World, id: EntityId) -> bool;
}Expand description
Describes what data a query fetches for each matching entity.
Implementations exist for:
EntityId— passes through the entity ID&Tfor built-in components — reads from the component’sSecondaryMapOption<&T>for built-in components — optional read (always matches)&Ext<T>for extension components — read from extension storage- Tuples of the above (up to arity 8)
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.