Trait bevy_internal::ecs::query::FilterFetch
source · [−]pub trait FilterFetch: for<'s, 'w> 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.
This trait is automatically implemented for every type that implements Fetch
trait and
specifies bool
as the associated type for Fetch::Item
.
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.