Struct hecs::Without

source ·
pub struct Without<Q, R>(_);
Expand description

Query transformer skipping entities that satisfy another query

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§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.