[][src]Trait hreq::server::StateHandler

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

Required methods

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

Loading content...

Implementors

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

Loading content...