[−][src]Struct bevy_ecs::QueryOne
A borrow of a World
sufficient to execute the query Q
on a single entity
Implementations
impl<'a, Q> QueryOne<'a, Q> where
Q: Query,
[src]
Q: Query,
pub fn get(&mut self) -> Option<<<Q as Query>::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>(self) -> QueryOne<'a, With<T, Q>> where
T: Component,
[src]
T: Component,
Transform the query into one that requires a certain component without borrowing it
See QueryBorrow::with
for details.
pub fn without<T>(self) -> QueryOne<'a, Without<T, Q>> where
T: Component,
[src]
T: Component,
Transform the query into one that skips entities having a certain component
See QueryBorrow::without
for details.
Trait Implementations
impl<'_, Q> Send for QueryOne<'_, Q> where
Q: Query,
[src]
Q: Query,
impl<'_, Q> Sync for QueryOne<'_, Q> where
Q: Query,
[src]
Q: Query,
Auto Trait Implementations
impl<'a, Q> !RefUnwindSafe for QueryOne<'a, Q>
impl<'a, Q> Unpin for QueryOne<'a, Q> where
Q: Unpin,
Q: Unpin,
impl<'a, Q> !UnwindSafe for QueryOne<'a, Q>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Component for T where
T: 'static + Send + Sync,
[src]
T: 'static + Send + Sync,
impl<T> Downcast for T where
T: Any,
[src]
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
[src]
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
[src]
fn as_any(&self) -> &(dyn Any + 'static)
[src]
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
impl<T> DowncastSync for T where
T: Send + Sync + Any,
[src]
T: Send + Sync + Any,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,