Skip to main content

ObserverSystemExt

Trait ObserverSystemExt 

Source
pub trait ObserverSystemExt<E, B, M>: Sized + IntoObserverSystem<E, B, M>
where E: Event, B: Bundle,
{ // Provided method fn run_if<C, CM>(self, condition: C) -> ObserverWithCondition<E, B, M, Self> where C: SystemCondition<CM> { ... } }
Expand description

Extension trait for adding run conditions to observer systems.

Provided Methods§

Source

fn run_if<C, CM>(self, condition: C) -> ObserverWithCondition<E, B, M, Self>
where C: SystemCondition<CM>,

Adds a run condition to this observer system.

The observer will only run if the condition returns true. Multiple conditions can be chained (AND semantics).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<E, B, M, T> ObserverSystemExt<E, B, M> for T
where E: Event, B: Bundle, T: IntoObserverSystem<E, B, M>,