Skip to main content

ObserverSystem

Trait ObserverSystem 

Source
pub trait ObserverSystem<E>: 'static {
    // Required method
    fn run(&mut self, event: &E, world: &World, resources: &Resources);
}
Expand description

A runnable observer — the type-erased form IntoObserverSystem produces.

Required Methods§

Source

fn run(&mut self, event: &E, world: &World, resources: &Resources)

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T, Evt: 'static, A, B, C, D, E, F, G, H, I, J, K, L> ObserverSystem<Evt> for FunctionObserver<T, Evt, (A, B, C, D, E, F, G, H, I, J, K, L), (A::State, B::State, C::State, D::State, E::State, F::State, G::State, H::State, I::State, J::State, K::State, L::State)>
where T: FnMut(Trigger<'_, Evt>, A, B, C, D, E, F, G, H, I, J, K, L) + for<'a> FnMut(Trigger<'a, Evt>, A::Item<'a>, B::Item<'a>, C::Item<'a>, D::Item<'a>, E::Item<'a>, F::Item<'a>, G::Item<'a>, H::Item<'a>, I::Item<'a>, J::Item<'a>, K::Item<'a>, L::Item<'a>) + 'static, A: SystemParam + 'static, B: SystemParam + 'static, C: SystemParam + 'static, D: SystemParam + 'static, E: SystemParam + 'static, F: SystemParam + 'static, G: SystemParam + 'static, H: SystemParam + 'static, I: SystemParam + 'static, J: SystemParam + 'static, K: SystemParam + 'static, L: SystemParam + 'static,

Source§

impl<T, Evt: 'static, A, B, C, D, E, F, G, H, I, J, K> ObserverSystem<Evt> for FunctionObserver<T, Evt, (A, B, C, D, E, F, G, H, I, J, K), (A::State, B::State, C::State, D::State, E::State, F::State, G::State, H::State, I::State, J::State, K::State)>
where T: FnMut(Trigger<'_, Evt>, A, B, C, D, E, F, G, H, I, J, K) + for<'a> FnMut(Trigger<'a, Evt>, A::Item<'a>, B::Item<'a>, C::Item<'a>, D::Item<'a>, E::Item<'a>, F::Item<'a>, G::Item<'a>, H::Item<'a>, I::Item<'a>, J::Item<'a>, K::Item<'a>) + 'static, A: SystemParam + 'static, B: SystemParam + 'static, C: SystemParam + 'static, D: SystemParam + 'static, E: SystemParam + 'static, F: SystemParam + 'static, G: SystemParam + 'static, H: SystemParam + 'static, I: SystemParam + 'static, J: SystemParam + 'static, K: SystemParam + 'static,

Source§

impl<T, Evt: 'static, A, B, C, D, E, F, G, H, I, J> ObserverSystem<Evt> for FunctionObserver<T, Evt, (A, B, C, D, E, F, G, H, I, J), (A::State, B::State, C::State, D::State, E::State, F::State, G::State, H::State, I::State, J::State)>
where T: FnMut(Trigger<'_, Evt>, A, B, C, D, E, F, G, H, I, J) + for<'a> FnMut(Trigger<'a, Evt>, A::Item<'a>, B::Item<'a>, C::Item<'a>, D::Item<'a>, E::Item<'a>, F::Item<'a>, G::Item<'a>, H::Item<'a>, I::Item<'a>, J::Item<'a>) + 'static, A: SystemParam + 'static, B: SystemParam + 'static, C: SystemParam + 'static, D: SystemParam + 'static, E: SystemParam + 'static, F: SystemParam + 'static, G: SystemParam + 'static, H: SystemParam + 'static, I: SystemParam + 'static, J: SystemParam + 'static,

Source§

impl<T, Evt: 'static, A, B, C, D, E, F, G, H, I> ObserverSystem<Evt> for FunctionObserver<T, Evt, (A, B, C, D, E, F, G, H, I), (A::State, B::State, C::State, D::State, E::State, F::State, G::State, H::State, I::State)>
where T: FnMut(Trigger<'_, Evt>, A, B, C, D, E, F, G, H, I) + for<'a> FnMut(Trigger<'a, Evt>, A::Item<'a>, B::Item<'a>, C::Item<'a>, D::Item<'a>, E::Item<'a>, F::Item<'a>, G::Item<'a>, H::Item<'a>, I::Item<'a>) + 'static, A: SystemParam + 'static, B: SystemParam + 'static, C: SystemParam + 'static, D: SystemParam + 'static, E: SystemParam + 'static, F: SystemParam + 'static, G: SystemParam + 'static, H: SystemParam + 'static, I: SystemParam + 'static,

Source§

impl<T, Evt: 'static, A, B, C, D, E, F, G, H> ObserverSystem<Evt> for FunctionObserver<T, Evt, (A, B, C, D, E, F, G, H), (A::State, B::State, C::State, D::State, E::State, F::State, G::State, H::State)>
where T: FnMut(Trigger<'_, Evt>, A, B, C, D, E, F, G, H) + for<'a> FnMut(Trigger<'a, Evt>, A::Item<'a>, B::Item<'a>, C::Item<'a>, D::Item<'a>, E::Item<'a>, F::Item<'a>, G::Item<'a>, H::Item<'a>) + 'static, A: SystemParam + 'static, B: SystemParam + 'static, C: SystemParam + 'static, D: SystemParam + 'static, E: SystemParam + 'static, F: SystemParam + 'static, G: SystemParam + 'static, H: SystemParam + 'static,

Source§

impl<T, Evt: 'static, A, B, C, D, E, F, G> ObserverSystem<Evt> for FunctionObserver<T, Evt, (A, B, C, D, E, F, G), (A::State, B::State, C::State, D::State, E::State, F::State, G::State)>
where T: FnMut(Trigger<'_, Evt>, A, B, C, D, E, F, G) + for<'a> FnMut(Trigger<'a, Evt>, A::Item<'a>, B::Item<'a>, C::Item<'a>, D::Item<'a>, E::Item<'a>, F::Item<'a>, G::Item<'a>) + 'static, A: SystemParam + 'static, B: SystemParam + 'static, C: SystemParam + 'static, D: SystemParam + 'static, E: SystemParam + 'static, F: SystemParam + 'static, G: SystemParam + 'static,

Source§

impl<T, Evt: 'static, A, B, C, D, E, F> ObserverSystem<Evt> for FunctionObserver<T, Evt, (A, B, C, D, E, F), (A::State, B::State, C::State, D::State, E::State, F::State)>
where T: FnMut(Trigger<'_, Evt>, A, B, C, D, E, F) + for<'a> FnMut(Trigger<'a, Evt>, A::Item<'a>, B::Item<'a>, C::Item<'a>, D::Item<'a>, E::Item<'a>, F::Item<'a>) + 'static, A: SystemParam + 'static, B: SystemParam + 'static, C: SystemParam + 'static, D: SystemParam + 'static, E: SystemParam + 'static, F: SystemParam + 'static,

Source§

impl<T, Evt: 'static, A, B, C, D, E> ObserverSystem<Evt> for FunctionObserver<T, Evt, (A, B, C, D, E), (A::State, B::State, C::State, D::State, E::State)>
where T: FnMut(Trigger<'_, Evt>, A, B, C, D, E) + for<'a> FnMut(Trigger<'a, Evt>, A::Item<'a>, B::Item<'a>, C::Item<'a>, D::Item<'a>, E::Item<'a>) + 'static, A: SystemParam + 'static, B: SystemParam + 'static, C: SystemParam + 'static, D: SystemParam + 'static, E: SystemParam + 'static,

Source§

impl<T, Evt: 'static, A, B, C, D> ObserverSystem<Evt> for FunctionObserver<T, Evt, (A, B, C, D), (A::State, B::State, C::State, D::State)>
where T: FnMut(Trigger<'_, Evt>, A, B, C, D) + for<'a> FnMut(Trigger<'a, Evt>, A::Item<'a>, B::Item<'a>, C::Item<'a>, D::Item<'a>) + 'static, A: SystemParam + 'static, B: SystemParam + 'static, C: SystemParam + 'static, D: SystemParam + 'static,

Source§

impl<T, Evt: 'static, A, B, C> ObserverSystem<Evt> for FunctionObserver<T, Evt, (A, B, C), (A::State, B::State, C::State)>
where T: FnMut(Trigger<'_, Evt>, A, B, C) + for<'a> FnMut(Trigger<'a, Evt>, A::Item<'a>, B::Item<'a>, C::Item<'a>) + 'static, A: SystemParam + 'static, B: SystemParam + 'static, C: SystemParam + 'static,

Source§

impl<T, Evt: 'static, A, B> ObserverSystem<Evt> for FunctionObserver<T, Evt, (A, B), (A::State, B::State)>
where T: FnMut(Trigger<'_, Evt>, A, B) + for<'a> FnMut(Trigger<'a, Evt>, A::Item<'a>, B::Item<'a>) + 'static, A: SystemParam + 'static, B: SystemParam + 'static,

Source§

impl<T, Evt: 'static, A> ObserverSystem<Evt> for FunctionObserver<T, Evt, (A,), (A::State,)>
where T: FnMut(Trigger<'_, Evt>, A) + for<'a> FnMut(Trigger<'a, Evt>, A::Item<'a>) + 'static, A: SystemParam + 'static,

Source§

impl<T, Evt: 'static> ObserverSystem<Evt> for FunctionObserver<T, Evt, (), ()>
where T: FnMut(Trigger<'_, Evt>) + for<'a> FnMut(Trigger<'a, Evt>) + 'static,