macro_rules! response_pipe_fut { ($response:pat, $host:pat, $(move |$($move:ident:$ty:ty),+|)? $code:block) => { ... }; }
Expand description
Creates a super::ResponsePipeFuture
.
ยงExamples
prepare!(_req, host, _, addr, {
let response = default_error_response(StatusCode::METHOD_NOT_ALLOWED, host, None).await;
response.with_future(response_pipe_fut!(response_pipe, host, move |addr: SocketAddr| {
response_pipe.send(Bytes::from_static(b"This will be appended to the body!")).await;
}))
});