Trait Handler
lambda_http
pub trait Handler<R> { fn run(&mut self, event: Request, ctx: Context) -> Result<R, HandlerError>; }
Functions serving as ALB and API Gateway handlers must conform to this type.
fn run(&mut self, event: Request, ctx: Context) -> Result<R, HandlerError>
Run the handler.
impl<F, R> Handler<R> for F where F: FnMut(Request, Context) -> Result<R, HandlerError>,