Skip to main content

AfterHandler

Trait AfterHandler 

Source
pub trait AfterHandler<C, R, O, E, Params> {
    // Required method
    fn run(
        &self,
        context: &mut C,
        output: &mut O,
        resources: &mut R,
    ) -> Result<(), StageError<E>>;
}
Expand description

Adapts a typed function that runs after a successful command.

Required Methods§

Source

fn run( &self, context: &mut C, output: &mut O, resources: &mut R, ) -> Result<(), StageError<E>>

Validates resource access, extracts arguments, and invokes the function.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<C, R, O, E, F, P0, P1, P2, P3, P4, P5, P6, P7> AfterHandler<C, R, O, E, (P0, P1, P2, P3, P4, P5, P6, P7)> for F
where P0: SystemParam<R>, P1: SystemParam<R>, P2: SystemParam<R>, P3: SystemParam<R>, P4: SystemParam<R>, P5: SystemParam<R>, P6: SystemParam<R>, P7: SystemParam<R>, for<'context, 'output, 'resources> F: Fn(&mut C, &mut O, P0, P1, P2, P3, P4, P5, P6, P7) -> Result<(), E> + Fn(&'context mut C, &'output mut O, P0::Item<'resources>, P1::Item<'resources>, P2::Item<'resources>, P3::Item<'resources>, P4::Item<'resources>, P5::Item<'resources>, P6::Item<'resources>, P7::Item<'resources>) -> Result<(), E>,

Source§

impl<C, R, O, E, F, P0, P1, P2, P3, P4, P5, P6> AfterHandler<C, R, O, E, (P0, P1, P2, P3, P4, P5, P6)> for F
where P0: SystemParam<R>, P1: SystemParam<R>, P2: SystemParam<R>, P3: SystemParam<R>, P4: SystemParam<R>, P5: SystemParam<R>, P6: SystemParam<R>, for<'context, 'output, 'resources> F: Fn(&mut C, &mut O, P0, P1, P2, P3, P4, P5, P6) -> Result<(), E> + Fn(&'context mut C, &'output mut O, P0::Item<'resources>, P1::Item<'resources>, P2::Item<'resources>, P3::Item<'resources>, P4::Item<'resources>, P5::Item<'resources>, P6::Item<'resources>) -> Result<(), E>,

Source§

impl<C, R, O, E, F, P0, P1, P2, P3, P4, P5> AfterHandler<C, R, O, E, (P0, P1, P2, P3, P4, P5)> for F
where P0: SystemParam<R>, P1: SystemParam<R>, P2: SystemParam<R>, P3: SystemParam<R>, P4: SystemParam<R>, P5: SystemParam<R>, for<'context, 'output, 'resources> F: Fn(&mut C, &mut O, P0, P1, P2, P3, P4, P5) -> Result<(), E> + Fn(&'context mut C, &'output mut O, P0::Item<'resources>, P1::Item<'resources>, P2::Item<'resources>, P3::Item<'resources>, P4::Item<'resources>, P5::Item<'resources>) -> Result<(), E>,

Source§

impl<C, R, O, E, F, P0, P1, P2, P3, P4> AfterHandler<C, R, O, E, (P0, P1, P2, P3, P4)> for F
where P0: SystemParam<R>, P1: SystemParam<R>, P2: SystemParam<R>, P3: SystemParam<R>, P4: SystemParam<R>, for<'context, 'output, 'resources> F: Fn(&mut C, &mut O, P0, P1, P2, P3, P4) -> Result<(), E> + Fn(&'context mut C, &'output mut O, P0::Item<'resources>, P1::Item<'resources>, P2::Item<'resources>, P3::Item<'resources>, P4::Item<'resources>) -> Result<(), E>,

Source§

impl<C, R, O, E, F, P0, P1, P2, P3> AfterHandler<C, R, O, E, (P0, P1, P2, P3)> for F
where P0: SystemParam<R>, P1: SystemParam<R>, P2: SystemParam<R>, P3: SystemParam<R>, for<'context, 'output, 'resources> F: Fn(&mut C, &mut O, P0, P1, P2, P3) -> Result<(), E> + Fn(&'context mut C, &'output mut O, P0::Item<'resources>, P1::Item<'resources>, P2::Item<'resources>, P3::Item<'resources>) -> Result<(), E>,

Source§

impl<C, R, O, E, F, P0, P1, P2> AfterHandler<C, R, O, E, (P0, P1, P2)> for F
where P0: SystemParam<R>, P1: SystemParam<R>, P2: SystemParam<R>, for<'context, 'output, 'resources> F: Fn(&mut C, &mut O, P0, P1, P2) -> Result<(), E> + Fn(&'context mut C, &'output mut O, P0::Item<'resources>, P1::Item<'resources>, P2::Item<'resources>) -> Result<(), E>,

Source§

impl<C, R, O, E, F, P0, P1> AfterHandler<C, R, O, E, (P0, P1)> for F
where P0: SystemParam<R>, P1: SystemParam<R>, for<'context, 'output, 'resources> F: Fn(&mut C, &mut O, P0, P1) -> Result<(), E> + Fn(&'context mut C, &'output mut O, P0::Item<'resources>, P1::Item<'resources>) -> Result<(), E>,

Source§

impl<C, R, O, E, F, P0> AfterHandler<C, R, O, E, (P0,)> for F
where P0: SystemParam<R>, for<'context, 'output, 'resources> F: Fn(&mut C, &mut O, P0) -> Result<(), E> + Fn(&'context mut C, &'output mut O, P0::Item<'resources>) -> Result<(), E>,

Source§

impl<C, R, O, E, F> AfterHandler<C, R, O, E, ()> for F
where F: Fn(&mut C, &mut O) -> Result<(), E>,