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.
Source§unsafe fn fetch<'a>(
_page_ptr: *const ComponentPage,
_row_index: usize,
) -> Self::Item<'a>
unsafe fn fetch<'a>( _page_ptr: *const ComponentPage, _row_index: usize, ) -> Self::Item<'a>
Fetches nothing. Returns a unit type ().
Source§unsafe fn fetch_from_world<'a>(
world: *const World,
entity_id: EntityId,
) -> Option<Self::Item<'a>>
unsafe fn fetch_from_world<'a>( world: *const World, entity_id: EntityId, ) -> Option<Self::Item<'a>>
Fetches the query’s item directly from the world for a specific entity. Read more
Source§fn mutable_type_ids() -> Vec<TypeId>
fn mutable_type_ids() -> Vec<TypeId>
Returns the
TypeIds of the components this query accesses mutably
(&mut T / Option<&mut T> terms). World::query_mut uses this to
mark the matching domains changed once per query construction.
Read-only terms and filters return nothing (the default).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> UnsafeUnpin for Without<T>
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