Trait bevy_compose::Compose

source ·
pub trait Compose {
    type State: Send + Sync + 'static;
    type Input<'w, 's>: SystemParam;

    // Required methods
    fn setup(app: &mut App) -> Self::State;
    fn run(
        self,
        state: &mut Self::State,
        input: <Self::Input<'_, '_> as SystemParam>::Item<'_, '_>
    );
}

Required Associated Types§

source

type State: Send + Sync + 'static

source

type Input<'w, 's>: SystemParam

Required Methods§

source

fn setup(app: &mut App) -> Self::State

source

fn run( self, state: &mut Self::State, input: <Self::Input<'_, '_> as SystemParam>::Item<'_, '_> )

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Compose for ()

§

type State = ()

§

type Input<'w, 's> = ()

source§

fn setup(_app: &mut App) -> Self::State

source§

fn run(self, _state: &mut Self::State, _input: Self::Input<'_, '_>)

source§

impl<C1, C2> Compose for (C1, C2)
where C1: Compose + Send + Sync + 'static, C2: Compose + Send + Sync + 'static,

§

type State = [Entity; 2]

§

type Input<'w, 's> = (Query<'w, 's, &'static mut TupleCompose<C1>>, Query<'w, 's, &'static mut TupleCompose<C2>>)

source§

fn setup(app: &mut App) -> Self::State

source§

fn run( self, [entity1, entity2]: &mut Self::State, (query1, query2): <Self::Input<'_, '_> as SystemParam>::Item<'_, '_> )

Implementors§

source§

impl<D, F, Marker> Compose for Effect<D, F, Marker>
where D: PartialEq + Send + Sync + 'static, F: SystemParamFunction<Marker, In = (), Out = ()>,

§

type State = Option<D>

§

type Input<'w, 's> = ParamSet<'w, 's, (<F as SystemParamFunction<Marker>>::Param,)>

source§

impl<Marker, F, C> Compose for Lazy<F, (Marker, C)>
where Marker: 'static, F: SystemParamFunction<Marker, In = (), Out = C>, F::Param: 'static, C: Compose + 'static,

§

type State = Entity

§

type Input<'w, 's> = Query<'w, 's, &'static mut LazyFunction<F>>