Trait kvarn::extensions::PostCall
source · [−]pub trait PostCall: Send + Sync {
fn call<'a>(
&'a self,
request: &'a FatRequest,
host: &'a Host,
response_pipe: &'a mut ResponsePipe,
identity_body: Bytes,
addr: SocketAddr
) -> RetFut<'a, ()>;
}
Expand description
Implement this to pass your extension to Extensions::add_post
.
Required Methods
fn call<'a>(
&'a self,
request: &'a FatRequest,
host: &'a Host,
response_pipe: &'a mut ResponsePipe,
identity_body: Bytes,
addr: SocketAddr
) -> RetFut<'a, ()>
fn call<'a>(
&'a self,
request: &'a FatRequest,
host: &'a Host,
response_pipe: &'a mut ResponsePipe,
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.