Trait IntoObserverSystem

Source
pub trait IntoObserverSystem<E: 'static, B: Bundle, M, Out = Result>: Send + 'static {
    type System: ObserverSystem<E, B, Out>;

    // Required method
    fn into_system(this: Self) -> Self::System;
}
Expand description

Implemented for systems that convert into ObserverSystem.

§Usage notes

This trait should only be used as a bound for trait implementations or as an argument to a function. If an observer system needs to be returned from a function or stored somewhere, use ObserverSystem instead of this trait.

Required Associated Types§

Source

type System: ObserverSystem<E, B, Out>

The type of System that this instance converts into.

Required Methods§

Source

fn into_system(this: Self) -> Self::System

Turns this value into its corresponding System.

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, S> IntoObserverSystem<E, B, (<fn() -> ! as FnRet>::Output, M)> for S
where S: IntoSystem<Trigger<'static, E, B>, Never, M> + Send + 'static, E: Send + Sync + 'static, B: Bundle,

Source§

type System = InfallibleObserverWrapper<E, B, <S as IntoSystem<Trigger<'static, E, B>, <fn() -> ! as FnRet>::Output, M>>::System, <fn() -> ! as FnRet>::Output>

Source§

impl<E, B, M, S> IntoObserverSystem<E, B, (Infallible, M)> for S
where S: IntoSystem<Trigger<'static, E, B>, (), M> + Send + 'static, S::System: ObserverSystem<E, B, ()>, E: Send + Sync + 'static, B: Bundle,

Source§

type System = InfallibleObserverWrapper<E, B, <S as IntoSystem<Trigger<'static, E, B>, (), M>>::System, ()>

Source§

impl<E, B, M, S, Out> IntoObserverSystem<E, B, (Fallible, M), Out> for S
where S: IntoSystem<Trigger<'static, E, B>, Out, M> + Send + 'static, S::System: ObserverSystem<E, B, Out>, E: 'static, B: Bundle,

Source§

type System = <S as IntoSystem<Trigger<'static, E, B>, Out, M>>::System