pub trait Filter<'w>where
Self: Sized + Debug,{
type Prepared: PreparedFilter + 'w;
fn prepare(
&'w self,
archetype: &'w Archetype,
change_tick: u32
) -> Self::Prepared;
fn matches(&self, arch: &Archetype) -> bool;
fn access(&self, id: ArchetypeId, arch: &Archetype) -> Vec<Access>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,;
}Expand description
A filter over a query which will be prepared for an archetype, yielding subsets of slots.
A filter requires Debug for error messages for user conveniance
Required Associated Types
sourcetype Prepared: PreparedFilter + 'w
type Prepared: PreparedFilter + 'w
The filter holding possible borrows
Required Methods
Prepare the filter for an archetype.
change_tick refers to the last time this query was run. Useful for
change detection.
Returns true if the filter will yield at least one entity from the archetype.
Returns false if an entity will never yield, such as a mismatched archetype
Implementations on Foreign Types
sourceimpl<'w, F> Filter<'w> for &Fwhere
F: Filter<'w>,
impl<'w, F> Filter<'w> for &Fwhere
F: Filter<'w>,
type Prepared = <F as Filter<'w>>::Prepared
fn prepare(&'w self, archetype: &'w Archetype, change_tick: u32) -> Self::Prepared
fn matches(&self, arch: &Archetype) -> bool
fn access(&self, id: ArchetypeId, arch: &Archetype) -> Vec<Access>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
sourceimpl<'w, A> Filter<'w> for (A,)where
A: Filter<'w>,
impl<'w, A> Filter<'w> for (A,)where
A: Filter<'w>,
type Prepared = (<A as Filter<'w>>::Prepared,)
fn prepare(&'w self, arch: &'w Archetype, change_tick: u32) -> Self::Prepared
fn matches(&self, arch: &Archetype) -> bool
fn access(&self, id: ArchetypeId, arch: &Archetype) -> Vec<Access>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
sourceimpl<'w, A, B> Filter<'w> for (A, B)where
A: Filter<'w>,
B: Filter<'w>,
impl<'w, A, B> Filter<'w> for (A, B)where
A: Filter<'w>,
B: Filter<'w>,
type Prepared = (<A as Filter<'w>>::Prepared, <B as Filter<'w>>::Prepared)
fn prepare(&'w self, arch: &'w Archetype, change_tick: u32) -> Self::Prepared
fn matches(&self, arch: &Archetype) -> bool
fn access(&self, id: ArchetypeId, arch: &Archetype) -> Vec<Access>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
sourceimpl<'w, A, B, C> Filter<'w> for (A, B, C)where
A: Filter<'w>,
B: Filter<'w>,
C: Filter<'w>,
impl<'w, A, B, C> Filter<'w> for (A, B, C)where
A: Filter<'w>,
B: Filter<'w>,
C: Filter<'w>,
type Prepared = (<A as Filter<'w>>::Prepared, <B as Filter<'w>>::Prepared, <C as Filter<'w>>::Prepared)
fn prepare(&'w self, arch: &'w Archetype, change_tick: u32) -> Self::Prepared
fn matches(&self, arch: &Archetype) -> bool
fn access(&self, id: ArchetypeId, arch: &Archetype) -> Vec<Access>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
sourceimpl<'w, A, B, C, D> Filter<'w> for (A, B, C, D)where
A: Filter<'w>,
B: Filter<'w>,
C: Filter<'w>,
D: Filter<'w>,
impl<'w, A, B, C, D> Filter<'w> for (A, B, C, D)where
A: Filter<'w>,
B: Filter<'w>,
C: Filter<'w>,
D: Filter<'w>,
type Prepared = (<A as Filter<'w>>::Prepared, <B as Filter<'w>>::Prepared, <C as Filter<'w>>::Prepared, <D as Filter<'w>>::Prepared)
fn prepare(&'w self, arch: &'w Archetype, change_tick: u32) -> Self::Prepared
fn matches(&self, arch: &Archetype) -> bool
fn access(&self, id: ArchetypeId, arch: &Archetype) -> Vec<Access>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
sourceimpl<'w, A, B, C, D, E> Filter<'w> for (A, B, C, D, E)where
A: Filter<'w>,
B: Filter<'w>,
C: Filter<'w>,
D: Filter<'w>,
E: Filter<'w>,
impl<'w, A, B, C, D, E> Filter<'w> for (A, B, C, D, E)where
A: Filter<'w>,
B: Filter<'w>,
C: Filter<'w>,
D: Filter<'w>,
E: Filter<'w>,
type Prepared = (<A as Filter<'w>>::Prepared, <B as Filter<'w>>::Prepared, <C as Filter<'w>>::Prepared, <D as Filter<'w>>::Prepared, <E as Filter<'w>>::Prepared)
fn prepare(&'w self, arch: &'w Archetype, change_tick: u32) -> Self::Prepared
fn matches(&self, arch: &Archetype) -> bool
fn access(&self, id: ArchetypeId, arch: &Archetype) -> Vec<Access>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
sourceimpl<'w, A, B, C, D, E, F> Filter<'w> for (A, B, C, D, E, F)where
A: Filter<'w>,
B: Filter<'w>,
C: Filter<'w>,
D: Filter<'w>,
E: Filter<'w>,
F: Filter<'w>,
impl<'w, A, B, C, D, E, F> Filter<'w> for (A, B, C, D, E, F)where
A: Filter<'w>,
B: Filter<'w>,
C: Filter<'w>,
D: Filter<'w>,
E: Filter<'w>,
F: Filter<'w>,
type Prepared = (<A as Filter<'w>>::Prepared, <B as Filter<'w>>::Prepared, <C as Filter<'w>>::Prepared, <D as Filter<'w>>::Prepared, <E as Filter<'w>>::Prepared, <F as Filter<'w>>::Prepared)
fn prepare(&'w self, arch: &'w Archetype, change_tick: u32) -> Self::Prepared
fn matches(&self, arch: &Archetype) -> bool
fn access(&self, id: ArchetypeId, arch: &Archetype) -> Vec<Access>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
sourceimpl<'w, A, B, C, D, E, F, H> Filter<'w> for (A, B, C, D, E, F, H)where
A: Filter<'w>,
B: Filter<'w>,
C: Filter<'w>,
D: Filter<'w>,
E: Filter<'w>,
F: Filter<'w>,
H: Filter<'w>,
impl<'w, A, B, C, D, E, F, H> Filter<'w> for (A, B, C, D, E, F, H)where
A: Filter<'w>,
B: Filter<'w>,
C: Filter<'w>,
D: Filter<'w>,
E: Filter<'w>,
F: Filter<'w>,
H: Filter<'w>,
type Prepared = (<A as Filter<'w>>::Prepared, <B as Filter<'w>>::Prepared, <C as Filter<'w>>::Prepared, <D as Filter<'w>>::Prepared, <E as Filter<'w>>::Prepared, <F as Filter<'w>>::Prepared, <H as Filter<'w>>::Prepared)
fn prepare(&'w self, arch: &'w Archetype, change_tick: u32) -> Self::Prepared
fn matches(&self, arch: &Archetype) -> bool
fn access(&self, id: ArchetypeId, arch: &Archetype) -> Vec<Access>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
sourceimpl<'w, A, B, C, D, E, F, H, I> Filter<'w> for (A, B, C, D, E, F, H, I)where
A: Filter<'w>,
B: Filter<'w>,
C: Filter<'w>,
D: Filter<'w>,
E: Filter<'w>,
F: Filter<'w>,
H: Filter<'w>,
I: Filter<'w>,
impl<'w, A, B, C, D, E, F, H, I> Filter<'w> for (A, B, C, D, E, F, H, I)where
A: Filter<'w>,
B: Filter<'w>,
C: Filter<'w>,
D: Filter<'w>,
E: Filter<'w>,
F: Filter<'w>,
H: Filter<'w>,
I: Filter<'w>,
type Prepared = (<A as Filter<'w>>::Prepared, <B as Filter<'w>>::Prepared, <C as Filter<'w>>::Prepared, <D as Filter<'w>>::Prepared, <E as Filter<'w>>::Prepared, <F as Filter<'w>>::Prepared, <H as Filter<'w>>::Prepared, <I as Filter<'w>>::Prepared)
fn prepare(&'w self, arch: &'w Archetype, change_tick: u32) -> Self::Prepared
fn matches(&self, arch: &Archetype) -> bool
fn access(&self, id: ArchetypeId, arch: &Archetype) -> Vec<Access>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
sourceimpl<'w, A, B, C, D, E, F, H, I, J> Filter<'w> for (A, B, C, D, E, F, H, I, J)where
A: Filter<'w>,
B: Filter<'w>,
C: Filter<'w>,
D: Filter<'w>,
E: Filter<'w>,
F: Filter<'w>,
H: Filter<'w>,
I: Filter<'w>,
J: Filter<'w>,
impl<'w, A, B, C, D, E, F, H, I, J> Filter<'w> for (A, B, C, D, E, F, H, I, J)where
A: Filter<'w>,
B: Filter<'w>,
C: Filter<'w>,
D: Filter<'w>,
E: Filter<'w>,
F: Filter<'w>,
H: Filter<'w>,
I: Filter<'w>,
J: Filter<'w>,
type Prepared = (<A as Filter<'w>>::Prepared, <B as Filter<'w>>::Prepared, <C as Filter<'w>>::Prepared, <D as Filter<'w>>::Prepared, <E as Filter<'w>>::Prepared, <F as Filter<'w>>::Prepared, <H as Filter<'w>>::Prepared, <I as Filter<'w>>::Prepared, <J as Filter<'w>>::Prepared)
fn prepare(&'w self, arch: &'w Archetype, change_tick: u32) -> Self::Prepared
fn matches(&self, arch: &Archetype) -> bool
fn access(&self, id: ArchetypeId, arch: &Archetype) -> Vec<Access>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,