1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-31 17:07:01 +02:00

add ServiceResponse::into_parts (#2499)

This commit is contained in:
Ali MJ Al-Nasrawy
2021-12-09 17:57:27 +03:00
committed by GitHub
parent 774ac7fec4
commit f9348d7129
2 changed files with 8 additions and 0 deletions

View File

@@ -410,6 +410,12 @@ impl<B> ServiceResponse<B> {
self.response.headers_mut()
}
/// Destructures `ServiceResponse` into request and response components.
#[inline]
pub fn into_parts(self) -> (HttpRequest, HttpResponse<B>) {
(self.request, self.response)
}
/// Extract response body
#[inline]
pub fn into_body(self) -> B {