Struct bevy_ecs::query::Added [−][src]
pub struct Added<T>(_);
Expand description
Filter that retrieves components of type T
that have been added since the last execution
of this system.
This filter is useful to do one-time post-processing on components.
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.
If instead behavior is meant to change on whether the component changed or not
ChangeTrackers
may be used.
Examples
fn print_add_name_component(query: Query<&Name, Added<Name>>) {
for name in query.iter() {
println!("Named entity created: {:?}", name)
}
}
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for Added<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for Added<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more