pub struct Without<T: Component>(/* private fields */);
Expand description
A WorldQuery
filter that matches entities that do NOT have component T
.
This is used as a marker in a query tuple to exclude entities. For example,
Query<(&Position, Without<Velocity>)>
will iterate over all entities
that have a Position
but no Velocity
.
Trait Implementations§
Source§impl<T: Component> WorldQuery for Without<T>
impl<T: Component> WorldQuery for Without<T>
Source§fn type_ids() -> Vec<TypeId>
fn type_ids() -> Vec<TypeId>
A Without
filter does not add any component types to the query’s main
signature for page matching. The filtering is handled separately.
Source§fn without_type_ids() -> Vec<TypeId>
fn without_type_ids() -> Vec<TypeId>
This is the key part of the filter: it returns the TypeId of the component to filter out.
Auto Trait Implementations§
impl<T> Freeze for Without<T>
impl<T> RefUnwindSafe for Without<T>where
T: RefUnwindSafe,
impl<T> Send for Without<T>
impl<T> Sync for Without<T>
impl<T> Unpin for Without<T>where
T: Unpin,
impl<T> UnwindSafe for Without<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more