pub struct Without<Q, R>(/* private fields */);Expand description
Transforms query Q by skipping entities satisfying query R
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<&i32, &bool>>()
.iter()
.map(|(e, &i)| (e, i))
.collect::<Vec<_>>();
assert_eq!(entities, &[(c, 42)]);Trait Implementations§
Auto Trait Implementations§
impl<Q, R> Freeze for Without<Q, R>
impl<Q, R> RefUnwindSafe for Without<Q, R>where
Q: RefUnwindSafe,
impl<Q, R> Send for Without<Q, R>where
Q: Send,
impl<Q, R> Sync for Without<Q, R>where
Q: Sync,
impl<Q, R> Unpin for Without<Q, R>where
Q: Unpin,
impl<Q, R> UnwindSafe for Without<Q, R>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
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more