[−][src]Struct bevy_ecs::prelude::Query
Provides scoped access to a World according to a given HecsQuery
Implementations
impl<'a, Q: HecsQuery> Query<'a, Q>
[src]
pub fn new(world: &'a World, archetype_access: &'a ArchetypeAccess) -> Self
[src]
pub fn iter(&mut self) -> QueryBorrow<Q>
[src]
pub fn get<T: Component>(&self, entity: Entity) -> Result<Ref<T>, QueryError>
[src]
Gets a reference to the entity's component of the given type. This will fail if the entity does not have the given component type or if the given component type does not match this query.
pub fn entity(&self, entity: Entity) -> Result<QueryOne<Q>, QueryError>
[src]
pub fn get_mut<T: Component>(
&self,
entity: Entity
) -> Result<RefMut<T>, QueryError>
[src]
&self,
entity: Entity
) -> Result<RefMut<T>, QueryError>
Gets a mutable reference to the entity's component of the given type. This will fail if the entity does not have the given component type or if the given component type does not match this query.
pub fn removed<C: Component>(&self) -> &[Entity]
[src]
pub fn set<T: Component>(
&self,
entity: Entity,
component: T
) -> Result<(), QueryError>
[src]
&self,
entity: Entity,
component: T
) -> Result<(), QueryError>
Sets the entity's component to the given value. This will fail if the entity does not already have the given component type or if the given component type does not match this query.
Auto Trait Implementations
impl<'a, Q> !RefUnwindSafe for Query<'a, Q>
impl<'a, Q> Send for Query<'a, Q> where
Q: Send,
Q: Send,
impl<'a, Q> Sync for Query<'a, Q> where
Q: Sync,
Q: Sync,
impl<'a, Q> Unpin for Query<'a, Q> where
Q: Unpin,
Q: Unpin,
impl<'a, Q> !UnwindSafe for Query<'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> 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>,