pub trait WorldQuery: 'static {
type Item<'w>;
// Required methods
fn required_types() -> Vec<TypeId>;
fn matches(arch: &Archetype) -> bool;
unsafe fn fetch<'w>(arch: &'w Archetype, row: usize) -> Self::Item<'w>;
}Expand description
Trait for types that describe how to fetch data from an archetype row.
Required Associated Types§
Required Methods§
Sourcefn required_types() -> Vec<TypeId>
fn required_types() -> Vec<TypeId>
Required component TypeIds (must all be present in the archetype).
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.