pub trait Middleware {
    // Required method
    fn next(
        &'static self,
        ctx: HttpContext,
        chain: &'static dyn MiddlewareChain
    ) -> BoxFuture<'static, Result<HttpContext, SaphirError>>;
}

Required Methods§

source

fn next( &'static self, ctx: HttpContext, chain: &'static dyn MiddlewareChain ) -> BoxFuture<'static, Result<HttpContext, SaphirError>>

Implementors§

source§

impl Middleware for FileMiddleware

Available on crate feature file only.
source§

impl<Fun, Fut> Middleware for Funwhere Fun: Fn(HttpContext, &'static dyn MiddlewareChain) -> Fut, Fut: 'static + Future<Output = Result<HttpContext, SaphirError>> + Send,