[][src]Trait hreq::server::Middleware

pub trait Middleware: Send + Sync + 'static {
    fn call<'a>(
        &'a self,
        req: Request<Body>,
        next: Next
    ) -> Pin<Box<dyn Future<Output = Reply> + Send + 'a>>; }

Required methods

fn call<'a>(
    &'a self,
    req: Request<Body>,
    next: Next
) -> Pin<Box<dyn Future<Output = Reply> + Send + 'a>>

Loading content...

Implementors

impl<F: Send + Sync + 'static, Fut, Ret> Middleware for F where
    F: Fn(Request<Body>, Next) -> Fut,
    Fut: Future<Output = Ret> + Send + 'static,
    Ret: Into<Reply>, 
[src]

Loading content...