Trait bevy_internal::ecs::query::FetchState[][src]

pub unsafe trait FetchState: Send + Sync {
    fn init(world: &mut World) -> Self;
fn update_component_access(&self, access: &mut FilteredAccess<ComponentId>);
fn update_archetype_component_access(
        &self,
        archetype: &Archetype,
        access: &mut Access<ArchetypeComponentId>
    );
fn matches_archetype(&self, archetype: &Archetype) -> bool;
fn matches_table(&self, table: &Table) -> bool; }
Expand description

State used to construct a 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 Fetch.

Safety

Implementor must ensure that FetchState::update_component_access and FetchState::update_archetype_component_access exactly reflects the results of FetchState::matches_archetype, FetchState::matches_table, Fetch::archetype_fetch, and Fetch::table_fetch.

Required methods

Implementations on Foreign Types

Implementors