Trait lambda_http::Handler[][src]

pub trait Handler<'a>: Sized {
    type Error;
    type Response: IntoResponse;
    type Fut: Future<Output = Result<Self::Response, Self::Error>> + Send + 'a;
    fn call(&self, event: Request, context: Context) -> Self::Fut;
}
Expand description

Functions serving as ALB and API Gateway REST and HTTP API handlers must conform to this type.

This can be viewed as a lambda_runtime::Handler constrained to http crate Request and Response types

Associated Types

The type of Error that this Handler will return

The type of Response this Handler will return

The type of Future this Handler will return

Required methods

Function used to execute handler behavior

Implementors