diff --git a/src/server/response.rs b/src/server/response.rs index 02329679..7b6a89c0 100644 --- a/src/server/response.rs +++ b/src/server/response.rs @@ -47,6 +47,12 @@ impl Response { headers: headers } } + + /// Deconstruct this Response into its constituent parts. + pub fn deconstruct(self) -> (version::HttpVersion, HttpWriter>>, + status::StatusCode, header::Headers) { + (self.version, self.body, self.status, self.headers) + } } impl Response { @@ -125,12 +131,6 @@ impl Response { /// Get a mutable reference to the Headers. pub fn headers_mut(&mut self) -> &mut header::Headers { &mut self.headers } - - /// Deconstruct this Response into its constituent parts. - pub fn deconstruct(self) -> (version::HttpVersion, HttpWriter>>, - status::StatusCode, header::Headers) { - (self.version, self.body, self.status, self.headers) - } } impl Response {