pub trait PostCall: KvarnSendSync {
    // Required method
    fn call<'a>(
        &'a self,
        request: &'a FatRequest,
        host: &'a Host,
        response_pipe: &'a mut ResponseBodyPipe,
        identity_body: Bytes,
        addr: SocketAddr
    ) -> RetFut<'a, ()>;
}
Expand description

Implement this to pass your extension to Extensions::add_post.

Required Methods§

source

fn call<'a>( &'a self, request: &'a FatRequest, host: &'a Host, response_pipe: &'a mut ResponseBodyPipe, identity_body: Bytes, addr: SocketAddr ) -> RetFut<'a, ()>

Arguments
  • An immutable reference to the request.
  • An immutable reference to the host this request is to.
  • A mutable reference to the ResponsePipe.
  • The plain text of the body of the response.
  • The SocketAddr of the requester.

Implementors§

source§

impl<F: for<'a> Fn(&'a FatRequest, &'a Host, &'a mut ResponseBodyPipe, Bytes, SocketAddr) -> RetFut<'a, ()> + KvarnSendSync> PostCall for F