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
sourceimpl<'q, Q: Query> PreparedView<'q, Q>
impl<'q, Q: Query> PreparedView<'q, Q>
sourcepub fn get<'m>(&'m self, entity: Entity) -> Option<QueryItem<'q, Q>> where
Q: QueryShared,
pub fn get<'m>(&'m self, entity: Entity) -> Option<QueryItem<'q, Q>> where
Q: QueryShared,
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.
sourcepub fn get_mut<'m>(&'m mut self, entity: Entity) -> Option<QueryItem<'q, Q>>
pub fn get_mut<'m>(&'m mut self, entity: Entity) -> Option<QueryItem<'q, Q>>
Retrieve the query results corresponding to entity
Will yield None
if the entity does not exist or does not match the query.
Auto Trait Implementations
impl<'q, Q> RefUnwindSafe for PreparedView<'q, Q> where
<Q as Query>::Fetch: RefUnwindSafe,
impl<'q, Q> Send for PreparedView<'q, Q> where
<Q as Query>::Fetch: Send,
impl<'q, Q> Sync for PreparedView<'q, Q> where
<Q as Query>::Fetch: Sync,
impl<'q, Q> Unpin for PreparedView<'q, Q>
impl<'q, Q> !UnwindSafe for PreparedView<'q, Q>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more