[][src]Struct bevy_ecs::QueryOneChecked

pub struct QueryOneChecked<'a, Q: HecsQuery> { /* fields omitted */ }

A borrow of a World sufficient to execute the query Q on a single entity

Implementations

impl<'a, Q: HecsQuery> QueryOneChecked<'a, Q>[src]

pub fn get(&mut self) -> Option<<Q::Fetch as Fetch<'_>>::Item>[src]

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.

pub fn with<T: Component>(self) -> QueryOneChecked<'a, With<T, Q>>[src]

Transform the query into one that requires a certain component without borrowing it

See QueryBorrow::with for details.

pub fn without<T: Component>(self) -> QueryOneChecked<'a, Without<T, Q>>[src]

Transform the query into one that skips entities having a certain component

See QueryBorrow::without for details.

Trait Implementations

impl<Q: HecsQuery, '_> Drop for QueryOneChecked<'_, Q>[src]

impl<Q: HecsQuery, '_> Send for QueryOneChecked<'_, Q>[src]

impl<Q: HecsQuery, '_> Sync for QueryOneChecked<'_, Q>[src]

Auto Trait Implementations

impl<'a, Q> !RefUnwindSafe for QueryOneChecked<'a, Q>

impl<'a, Q> Unpin for QueryOneChecked<'a, Q> where
    Q: Unpin

impl<'a, Q> !UnwindSafe for QueryOneChecked<'a, Q>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Component for T where
    T: 'static + Send + Sync
[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Send + Sync + Any
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,