Skip to main content

IntoObserverSystem

Trait IntoObserverSystem 

pub trait IntoObserverSystem<E, B, M, Out = ()>: Send + 'static
where E: Event, B: Bundle,
{ 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§

type System: ObserverSystem<E, B, Out>

The type of System that this instance converts into.

Required Methods§

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§

§

impl<E, B, M, Out, S> IntoObserverSystem<E, B, M, Out> for S
where E: Event + 'static, S: IntoSystem<On<'static, 'static, E, B>, Out, M> + Send + 'static, <S as IntoSystem<On<'static, 'static, E, B>, Out, M>>::System: ObserverSystem<E, B, Out>, B: Bundle,

§

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