SystemParamFunction

Trait SystemParamFunction 

Source
pub trait SystemParamFunction<Marker> {
    type In;
    type Out;
    type Param: SystemParam + 'static;

    // Required method
    fn run(
        &mut self,
        input: Self::In,
        param_value: SystemParamItem<'_, '_, Self::Param>,
    ) -> Self::Out;
}
Available on crate feature ecs only.
Expand description

A function that takes a SystemParam as input.

Required Associated Types§

Source

type In

The input type to this system. See System::In.

Source

type Out

The return type of this system. See System::Out.

Source

type Param: SystemParam + 'static

Required Methods§

Source

fn run( &mut self, input: Self::In, param_value: SystemParamItem<'_, '_, Self::Param>, ) -> Self::Out

Run the function with the provided SystemParam’s item.

Implementors§

Source§

impl<E: Event, B: Bundle, Out, Func> SystemParamFunction<fn(On<'_, '_, E, B>) -> Out> for Func
where for<'a> &'a mut Func: FnMut(On<'_, '_, E, B>) -> Out, Out: 'static,

Source§

type In = On<'static, 'static, E, B>

Source§

type Out = Out

Source§

type Param = ()

Source§

impl<E: Event, B: Bundle, Out, Func, T1: SystemParam + 'static> SystemParamFunction<fn(On<'_, '_, E, B>, T1) -> Out> for Func
where for<'a> &'a mut Func: FnMut(On<'_, '_, E, B>, T1) -> Out + FnMut(On<'_, '_, E, B>, SystemParamItem<'_, '_, T1>) -> Out, Out: 'static,

Source§

type In = On<'static, 'static, E, B>

Source§

type Out = Out

Source§

type Param = (T1,)

Source§

impl<E: Event, B: Bundle, Out, Func, T1: SystemParam + 'static, T2: SystemParam + 'static> SystemParamFunction<fn(On<'_, '_, E, B>, T1, T2) -> Out> for Func
where for<'a> &'a mut Func: FnMut(On<'_, '_, E, B>, T1, T2) -> Out + FnMut(On<'_, '_, E, B>, SystemParamItem<'_, '_, T1>, SystemParamItem<'_, '_, T2>) -> Out, Out: 'static,

Source§

type In = On<'static, 'static, E, B>

Source§

type Out = Out

Source§

type Param = (T1, T2)

Source§

impl<E: Event, B: Bundle, Out, Func, T1: SystemParam + 'static, T2: SystemParam + 'static, T3: SystemParam + 'static> SystemParamFunction<fn(On<'_, '_, E, B>, T1, T2, T3) -> Out> for Func
where for<'a> &'a mut Func: FnMut(On<'_, '_, E, B>, T1, T2, T3) -> Out + FnMut(On<'_, '_, E, B>, SystemParamItem<'_, '_, T1>, SystemParamItem<'_, '_, T2>, SystemParamItem<'_, '_, T3>) -> Out, Out: 'static,

Source§

type In = On<'static, 'static, E, B>

Source§

type Out = Out

Source§

type Param = (T1, T2, T3)

Source§

impl<E: Event, B: Bundle, Out, Func, T1: SystemParam + 'static, T2: SystemParam + 'static, T3: SystemParam + 'static, T4: SystemParam + 'static> SystemParamFunction<fn(On<'_, '_, E, B>, T1, T2, T3, T4) -> Out> for Func
where for<'a> &'a mut Func: FnMut(On<'_, '_, E, B>, T1, T2, T3, T4) -> Out + FnMut(On<'_, '_, E, B>, SystemParamItem<'_, '_, T1>, SystemParamItem<'_, '_, T2>, SystemParamItem<'_, '_, T3>, SystemParamItem<'_, '_, T4>) -> Out, Out: 'static,

Source§

type In = On<'static, 'static, E, B>

Source§

type Out = Out

Source§

type Param = (T1, T2, T3, T4)

Source§

impl<E: Event, B: Bundle, Out, Func, T1: SystemParam + 'static, T2: SystemParam + 'static, T3: SystemParam + 'static, T4: SystemParam + 'static, T5: SystemParam + 'static> SystemParamFunction<fn(On<'_, '_, E, B>, T1, T2, T3, T4, T5) -> Out> for Func
where for<'a> &'a mut Func: FnMut(On<'_, '_, E, B>, T1, T2, T3, T4, T5) -> Out + FnMut(On<'_, '_, E, B>, SystemParamItem<'_, '_, T1>, SystemParamItem<'_, '_, T2>, SystemParamItem<'_, '_, T3>, SystemParamItem<'_, '_, T4>, SystemParamItem<'_, '_, T5>) -> Out, Out: 'static,

Source§

type In = On<'static, 'static, E, B>

Source§

type Out = Out

Source§

type Param = (T1, T2, T3, T4, T5)

Source§

impl<E: Event, B: Bundle, Out, Func, T1: SystemParam + 'static, T2: SystemParam + 'static, T3: SystemParam + 'static, T4: SystemParam + 'static, T5: SystemParam + 'static, T6: SystemParam + 'static> SystemParamFunction<fn(On<'_, '_, E, B>, T1, T2, T3, T4, T5, T6) -> Out> for Func
where for<'a> &'a mut Func: FnMut(On<'_, '_, E, B>, T1, T2, T3, T4, T5, T6) -> Out + FnMut(On<'_, '_, E, B>, SystemParamItem<'_, '_, T1>, SystemParamItem<'_, '_, T2>, SystemParamItem<'_, '_, T3>, SystemParamItem<'_, '_, T4>, SystemParamItem<'_, '_, T5>, SystemParamItem<'_, '_, T6>) -> Out, Out: 'static,

Source§

type In = On<'static, 'static, E, B>

Source§

type Out = Out

Source§

type Param = (T1, T2, T3, T4, T5, T6)

Source§

impl<E: Event, B: Bundle, Out, Func, T1: SystemParam + 'static, T2: SystemParam + 'static, T3: SystemParam + 'static, T4: SystemParam + 'static, T5: SystemParam + 'static, T6: SystemParam + 'static, T7: SystemParam + 'static> SystemParamFunction<fn(On<'_, '_, E, B>, T1, T2, T3, T4, T5, T6, T7) -> Out> for Func
where for<'a> &'a mut Func: FnMut(On<'_, '_, E, B>, T1, T2, T3, T4, T5, T6, T7) -> Out + FnMut(On<'_, '_, E, B>, SystemParamItem<'_, '_, T1>, SystemParamItem<'_, '_, T2>, SystemParamItem<'_, '_, T3>, SystemParamItem<'_, '_, T4>, SystemParamItem<'_, '_, T5>, SystemParamItem<'_, '_, T6>, SystemParamItem<'_, '_, T7>) -> Out, Out: 'static,

Source§

type In = On<'static, 'static, E, B>

Source§

type Out = Out

Source§

type Param = (T1, T2, T3, T4, T5, T6, T7)

Source§

impl<E: Event, B: Bundle, Out, Func, T1: SystemParam + 'static, T2: SystemParam + 'static, T3: SystemParam + 'static, T4: SystemParam + 'static, T5: SystemParam + 'static, T6: SystemParam + 'static, T7: SystemParam + 'static, T8: SystemParam + 'static> SystemParamFunction<fn(On<'_, '_, E, B>, T1, T2, T3, T4, T5, T6, T7, T8) -> Out> for Func
where for<'a> &'a mut Func: FnMut(On<'_, '_, E, B>, T1, T2, T3, T4, T5, T6, T7, T8) -> Out + FnMut(On<'_, '_, E, B>, SystemParamItem<'_, '_, T1>, SystemParamItem<'_, '_, T2>, SystemParamItem<'_, '_, T3>, SystemParamItem<'_, '_, T4>, SystemParamItem<'_, '_, T5>, SystemParamItem<'_, '_, T6>, SystemParamItem<'_, '_, T7>, SystemParamItem<'_, '_, T8>) -> Out, Out: 'static,

Source§

type In = On<'static, 'static, E, B>

Source§

type Out = Out

Source§

type Param = (T1, T2, T3, T4, T5, T6, T7, T8)

Source§

impl<Input, Out, Func> SystemParamFunction<fn(In<Input>) -> Out> for Func
where for<'a> &'a mut Func: FnMut(In<Input>) -> Out, Out: 'static,

Source§

type In = Input

Source§

type Out = Out

Source§

type Param = ()

Source§

impl<Input, Out, Func, T1: SystemParam + 'static> SystemParamFunction<fn(In<Input>, T1) -> Out> for Func
where for<'a> &'a mut Func: FnMut(In<Input>, T1) -> Out + FnMut(In<Input>, SystemParamItem<'_, '_, T1>) -> Out, Out: 'static,

Source§

type In = Input

Source§

type Out = Out

Source§

type Param = (T1,)

Source§

impl<Input, Out, Func, T1: SystemParam + 'static, T2: SystemParam + 'static> SystemParamFunction<fn(In<Input>, T1, T2) -> Out> for Func
where for<'a> &'a mut Func: FnMut(In<Input>, T1, T2) -> Out + FnMut(In<Input>, SystemParamItem<'_, '_, T1>, SystemParamItem<'_, '_, T2>) -> Out, Out: 'static,

Source§

type In = Input

Source§

type Out = Out

Source§

type Param = (T1, T2)

Source§

impl<Input, Out, Func, T1: SystemParam + 'static, T2: SystemParam + 'static, T3: SystemParam + 'static> SystemParamFunction<fn(In<Input>, T1, T2, T3) -> Out> for Func
where for<'a> &'a mut Func: FnMut(In<Input>, T1, T2, T3) -> Out + FnMut(In<Input>, SystemParamItem<'_, '_, T1>, SystemParamItem<'_, '_, T2>, SystemParamItem<'_, '_, T3>) -> Out, Out: 'static,

Source§

type In = Input

Source§

type Out = Out

Source§

type Param = (T1, T2, T3)

Source§

impl<Input, Out, Func, T1: SystemParam + 'static, T2: SystemParam + 'static, T3: SystemParam + 'static, T4: SystemParam + 'static> SystemParamFunction<fn(In<Input>, T1, T2, T3, T4) -> Out> for Func
where for<'a> &'a mut Func: FnMut(In<Input>, T1, T2, T3, T4) -> Out + FnMut(In<Input>, SystemParamItem<'_, '_, T1>, SystemParamItem<'_, '_, T2>, SystemParamItem<'_, '_, T3>, SystemParamItem<'_, '_, T4>) -> Out, Out: 'static,

Source§

impl<Input, Out, Func, T1: SystemParam + 'static, T2: SystemParam + 'static, T3: SystemParam + 'static, T4: SystemParam + 'static, T5: SystemParam + 'static> SystemParamFunction<fn(In<Input>, T1, T2, T3, T4, T5) -> Out> for Func
where for<'a> &'a mut Func: FnMut(In<Input>, T1, T2, T3, T4, T5) -> Out + FnMut(In<Input>, SystemParamItem<'_, '_, T1>, SystemParamItem<'_, '_, T2>, SystemParamItem<'_, '_, T3>, SystemParamItem<'_, '_, T4>, SystemParamItem<'_, '_, T5>) -> Out, Out: 'static,

Source§

impl<Input, Out, Func, T1: SystemParam + 'static, T2: SystemParam + 'static, T3: SystemParam + 'static, T4: SystemParam + 'static, T5: SystemParam + 'static, T6: SystemParam + 'static> SystemParamFunction<fn(In<Input>, T1, T2, T3, T4, T5, T6) -> Out> for Func
where for<'a> &'a mut Func: FnMut(In<Input>, T1, T2, T3, T4, T5, T6) -> Out + FnMut(In<Input>, SystemParamItem<'_, '_, T1>, SystemParamItem<'_, '_, T2>, SystemParamItem<'_, '_, T3>, SystemParamItem<'_, '_, T4>, SystemParamItem<'_, '_, T5>, SystemParamItem<'_, '_, T6>) -> Out, Out: 'static,

Source§

impl<Input, Out, Func, T1: SystemParam + 'static, T2: SystemParam + 'static, T3: SystemParam + 'static, T4: SystemParam + 'static, T5: SystemParam + 'static, T6: SystemParam + 'static, T7: SystemParam + 'static> SystemParamFunction<fn(In<Input>, T1, T2, T3, T4, T5, T6, T7) -> Out> for Func
where for<'a> &'a mut Func: FnMut(In<Input>, T1, T2, T3, T4, T5, T6, T7) -> Out + FnMut(In<Input>, SystemParamItem<'_, '_, T1>, SystemParamItem<'_, '_, T2>, SystemParamItem<'_, '_, T3>, SystemParamItem<'_, '_, T4>, SystemParamItem<'_, '_, T5>, SystemParamItem<'_, '_, T6>, SystemParamItem<'_, '_, T7>) -> Out, Out: 'static,

Source§

impl<Input, Out, Func, T1: SystemParam + 'static, T2: SystemParam + 'static, T3: SystemParam + 'static, T4: SystemParam + 'static, T5: SystemParam + 'static, T6: SystemParam + 'static, T7: SystemParam + 'static, T8: SystemParam + 'static> SystemParamFunction<fn(In<Input>, T1, T2, T3, T4, T5, T6, T7, T8) -> Out> for Func
where for<'a> &'a mut Func: FnMut(In<Input>, T1, T2, T3, T4, T5, T6, T7, T8) -> Out + FnMut(In<Input>, SystemParamItem<'_, '_, T1>, SystemParamItem<'_, '_, T2>, SystemParamItem<'_, '_, T3>, SystemParamItem<'_, '_, T4>, SystemParamItem<'_, '_, T5>, SystemParamItem<'_, '_, T6>, SystemParamItem<'_, '_, T7>, SystemParamItem<'_, '_, T8>) -> Out, Out: 'static,