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§
sourcefn call<'a>(
&'a self,
request: &'a FatRequest,
host: &'a Host,
response_pipe: &'a mut ResponseBodyPipe,
identity_body: Bytes,
addr: SocketAddr,
) -> RetFut<'a, ()>
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.