Struct oxygengine::core::ecs::PreparedView
pub struct PreparedView<'q, Q>where
Q: Query,{ /* private fields */ }
Expand description
Provides random access to the results of a prepared query
Implementations§
§impl<'q, Q> PreparedView<'q, Q>where
Q: Query,
impl<'q, Q> PreparedView<'q, Q>where Q: Query,
pub fn get(&self, entity: Entity) -> Option<<Q as Query>::Item<'_>>where
Q: QueryShared,
pub fn get(&self, entity: Entity) -> Option<<Q as Query>::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.
pub fn get_mut(&mut self, entity: Entity) -> Option<<Q as Query>::Item<'_>>
pub fn get_mut(&mut self, entity: Entity) -> Option<<Q as Query>::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>::Item<'a>: for<'a> Send,
impl<'q, Q> Sync for PreparedView<'q, Q>where Q: Query, <Q as Query>::Item<'a>: for<'a> 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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more