Struct oxygengine_core::ecs::PreparedView
source · [−]pub struct PreparedView<'q, Q>where
Q: Query,{ /* private fields */ }
Expand description
Provides random access to the results of a prepared query
Implementations
sourceimpl<'q, Q> PreparedView<'q, Q>where
Q: Query,
impl<'q, Q> PreparedView<'q, Q>where
Q: Query,
sourcepub fn get(
&'m self,
entity: Entity
) -> Option<<<Q as Query>::Fetch as Fetch<'q>>::Item>where
Q: QueryShared,
pub fn get(
&'m self,
entity: Entity
) -> Option<<<Q as Query>::Fetch as Fetch<'q>>::Item>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 mut self,
entity: Entity
) -> Option<<<Q as Query>::Fetch as Fetch<'q>>::Item>
pub fn get_mut(
&'m mut self,
entity: Entity
) -> Option<<<Q as Query>::Fetch as Fetch<'q>>::Item>
Retrieve the query results corresponding to entity
Will yield None
if the entity does not exist or does not match the query.
Trait Implementations
impl<'q, Q> Send for PreparedView<'q, Q>where
Q: Query,
<<Q as Query>::Fetch as Fetch<'q>>::Item: Send,
impl<'q, Q> Sync for PreparedView<'q, Q>where
Q: Query,
<<Q as Query>::Fetch as Fetch<'q>>::Item: Send,
Auto Trait Implementations
impl<'q, Q> RefUnwindSafe for PreparedView<'q, Q>where
<Q as Query>::Fetch: RefUnwindSafe,
impl<'q, Q> Unpin for PreparedView<'q, Q>
impl<'q, Q> !UnwindSafe for PreparedView<'q, Q>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more