Struct hecs::PreparedView

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

Provides random access to the results of a prepared query

Implementations§

Retrieve the query results corresponding to entity

Will yield None if the entity does not exist or does not match the query.

Does not require exclusive access to the map, but is defined only for queries yielding only shared references.

Retrieve the query results corresponding to entity

Will yield None if the entity does not exist or does not match the query.

Like get_mut, but allows simultaneous access to multiple entities

Safety

Must not be invoked while any unique borrow of the fetched components of entity is live.

Like get_mut, but allows checked simultaneous access to multiple entities

See View::get_mut_n for details.

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.