Trait bevy_ecs::query::FilterFetch
source · [−]pub trait FilterFetch: for<'w, 's> Fetch<'w, 's> {
unsafe fn archetype_filter_fetch(&mut self, archetype_index: usize) -> bool;
unsafe fn table_filter_fetch(&mut self, table_row: usize) -> bool;
}
Expand description
Extension trait for Fetch
containing methods used by query filters.
This trait exists to allow “short circuit” behaviors for relevant query filter fetches.
Required methods
unsafe fn archetype_filter_fetch(&mut self, archetype_index: usize) -> bool
unsafe fn archetype_filter_fetch(&mut self, archetype_index: usize) -> bool
Safety
Must always be called after Fetch::set_archetype
. archetype_index
must be in the range
of the current archetype.
unsafe fn table_filter_fetch(&mut self, table_row: usize) -> bool
unsafe fn table_filter_fetch(&mut self, table_row: usize) -> bool
Safety
Must always be called after Fetch::set_table
. table_row
must be in the range of the
current table.