Struct hecs::PreparedQuery

source ·
pub struct PreparedQuery<Q: Query> { /* private fields */ }
Expand description

A prepared query can be stored independently of the World to amortize query set-up costs.

Implementations§

Create a prepared query which is not yet attached to any world

Query world, using dynamic borrow checking

This will panic if it would violate an existing unique reference or construct an invalid unique reference.

Query a uniquely borrowed world

Avoids the cost of the dynamic borrow checking performed by query.

Provide random access to query results for a uniquely borrow world

Trait Implementations§

Returns the “default value” for a 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.