[][src]Trait hreq::server::StateMiddleware

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

Required methods

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

Loading content...

Implementors

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

Loading content...