Struct bevy_ecs::query::Changed[][src]

pub struct Changed<T>(_);

Filter that retrieves components of type T that have been changed since the last execution of this system

This filter is useful for synchronizing components, and as a performance optimization as it means that the query contains fewer items for a system to iterate over.

Because the ordering of systems can change and this filter is only effective on changes before the query executes you need to use explicit dependency ordering or ordered stages to avoid frame delays.

Example:

fn print_moving_objects_system(query: Query<&Name, Changed<Transform>>) {
    for name in query.iter() {
        println!("Entity Moved: {:?}", name);
    }
}

Trait Implementations

Auto Trait Implementations

impl<T> RefUnwindSafe for Changed<T> where
    T: RefUnwindSafe

impl<T> Send for Changed<T> where
    T: Send

impl<T> Sync for Changed<T> where
    T: Sync

impl<T> Unpin for Changed<T> where
    T: Unpin

impl<T> UnwindSafe for Changed<T> where
    T: UnwindSafe

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: Any + Send + Sync
[src]

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

impl<T> Instrument 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>,