Trait Handler

Source
pub trait Handler<R, B, E> {
    // Required method
    fn run(&mut self, event: Request<B>) -> Result<R, E>;
}
Expand description

Functions acting as Now Lambda handlers must conform to this type.

Required Methods§

Source

fn run(&mut self, event: Request<B>) -> Result<R, E>

Method to execute the handler function

Implementors§

Source§

impl<Function, R, B, E> Handler<R, B, E> for Function
where Function: FnMut(Request<B>) -> Result<R, E>,