Trait lamedh_http::LambdaHandler[][src]

pub trait LambdaHandler<A, B> {
    type Error;
    type Fut: Future;
    pub fn call(&mut self, event: A, context: Context) -> Self::Fut;
}

A trait describing an asynchronous function A to B.

Associated Types

type Error[src]

Errors returned by this handler.

type Fut: Future[src]

Response of this handler.

Loading content...

Required methods

pub fn call(&mut self, event: A, context: Context) -> Self::Fut[src]

Handle the incoming event.

Loading content...

Implementations on Foreign Types

impl<F, A, B, Error, Fut> Handler<A, B> for HandlerFn<F> where
    Error: Into<Box<dyn Error + 'static + Send + Sync, Global>> + Display,
    Fut: Future<Output = Result<B, Error>> + Send,
    F: Fn(A, Context) -> Fut, 
[src]

type Error = Error

type Fut = Fut

Loading content...

Implementors

Loading content...