Handler

Trait Handler 

Source
pub trait Handler<Input>:
    DynClone
    + Send
    + Sync
    + 'static {
    type Output;

    // Required method
    fn call(&self, input: Input) -> Self::Output;
}

Required Associated Types§

Source

type Output

The returned type after the call operator is used.

Required Methods§

Source

fn call(&self, input: Input) -> Self::Output

Performs the call operation.

Implementors§

Source§

impl<F, I, O> Handler<I> for F
where I: Send + 'static, F: Fn(I) -> O + ?Sized + Clone + Send + Sync + 'static, O: Send + 'static,