[][src]Trait lambda_runtime::Handler

pub trait Handler<Event, Output, EventError> {
    fn run(&mut self, event: Event, ctx: Context) -> Result<Output, EventError>;
}

Functions acting as a handler must conform to this type.

Required methods

fn run(&mut self, event: Event, ctx: Context) -> Result<Output, EventError>

Method to execute the handler function

Loading content...

Implementors

impl<Function, Event, Output, EventError> Handler<Event, Output, EventError> for Function where
    Function: FnMut(Event, Context) -> Result<Output, EventError>,
    EventError: Fail + LambdaErrorExt + Display + Send + Sync
[src]

Implementation of the Handler trait for both function pointers and closures.

Loading content...