pub struct Without<T, Q>(/* private fields */);Expand description
Query transformer skipping entities that have a T component
See also QueryBorrow::without.
§Example
let mut world = World::new();
let a = world.spawn((123, true, "abc"));
let b = world.spawn((456, false));
let c = world.spawn((42, "def"));
let entities = world.query::<Without<bool, &i32>>()
.iter()
.map(|(e, &i)| (e, i))
.collect::<Vec<_>>();
assert_eq!(entities, &[(c, 42)]);Trait Implementations§
Auto Trait Implementations§
impl<T, Q> Freeze for Without<T, Q>
impl<T, Q> RefUnwindSafe for Without<T, Q>where
Q: RefUnwindSafe,
impl<T, Q> Send for Without<T, Q>where
Q: Send,
impl<T, Q> Sync for Without<T, Q>where
Q: Sync,
impl<T, Q> Unpin for Without<T, Q>where
Q: Unpin,
impl<T, Q> UnwindSafe for Without<T, Q>where
Q: 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