Struct oxygengine_core::ecs::pipeline::QueryOne
source · pub struct QueryOne<'a, Q>where
Q: Query,{ /* private fields */ }
Expand description
A borrow of a World
sufficient to execute the query Q
on a single entity
Implementations§
source§impl<'a, Q> QueryOne<'a, Q>where
Q: Query,
impl<'a, Q> QueryOne<'a, Q>where Q: Query,
sourcepub fn get(&mut self) -> Option<<Q as Query>::Item<'_>>
pub fn get(&mut self) -> Option<<Q as Query>::Item<'_>>
Get the query result, or None
if the entity does not satisfy the query
Must be called at most once.
Panics if called more than once or if it would construct a borrow that clashes with another pre-existing borrow.
Trait Implementations§
impl<Q> Send for QueryOne<'_, Q>where Q: Query,
impl<Q> Sync for QueryOne<'_, Q>where Q: Query,
Auto Trait Implementations§
impl<'a, Q> RefUnwindSafe for QueryOne<'a, Q>where Q: RefUnwindSafe,
impl<'a, Q> Unpin for QueryOne<'a, Q>where Q: Unpin,
impl<'a, Q> UnwindSafe for QueryOne<'a, Q>where Q: UnwindSafe,
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