Struct hecs::QueryOne

source ·
pub struct QueryOne<'a, Q: Query> { /* private fields */ }
Expand description

A borrow of a World sufficient to execute the query Q on a single entity

Implementations§

Get the query result, or None if the entity does not satisfy the query

Must be called at most once.

Panics if called more than once or if it would construct a borrow that clashes with another pre-existing borrow.

Transform the query into one that requires another query be satisfied

See QueryBorrow::with

Transform the query into one that skips entities satisfying another

See QueryBorrow::without for details.

Trait Implementations§

Executes the destructor for this type. Read more

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.