Skip to main content

Before

Trait Before 

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

Runs optional logic after command selection and before command execution.

Required Methods§

Source

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

Runs the before stage.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<C, R, E, F, Params> Before<C, R, E> for BeforeFn<F, Params>
where F: Handler<C, R, (), E, Params>,

Source§

impl<C, R, E> Before<C, R, E> for NoBefore