pub trait Middleware: Send + Sync {
    // Required method
    fn call(
        &self,
        ctx: Ctx,
        next: &'static dyn Next
    ) -> BoxFuture<'static, Result<Response>>;
}

Required Methods§

source

fn call( &self, ctx: Ctx, next: &'static dyn Next ) -> BoxFuture<'static, Result<Response>>

Implementors§

source§

impl<F, Fut> Middleware for F
where F: Fn(Ctx, &'static dyn Next) -> Fut + Sync + Send, Fut: Future<Output = Result<Response>> + Send + 'static,