response.rs
imports http
SHA-256358b0fa3e4d597e322fba60894a7fa18e9e914f3c36adf5544111bcdeb4dbaaf
MaleculeMd(In)
Evidence
1use std::fmt;
2#[cfg(feature = "compat")]
3use std::mem::replace;
4
5#[cfg(feature = "compat")]
6use http;
7
8use header::{Header, Headers};
9use proto::{MessageHead, ResponseHead, Body};
10use status::StatusCode;
11use version::HttpVersion;
12
13/// An HTTP Response
14pub struct Response<B = Body> {
15 version: HttpVersion,
16 headers: H …
26:34…
27 Response::default()
28 }
29
30 /// Get the HTTP version of this response.
31 #[inline]
32 pub fn version(&self) -> HttpVersion { self.version }
33
34 /// Get …
44:41… self.status }
45
46 /// Get the raw status code and reason.
47 ///
48 /// This method is only useful when inspecting the raw subject line from
49 …
52:56… self.raw_status }
53
54 /// Set the `StatusCode` for this response.
55 #[inline]
56 pub fn set_status(&mut self, status: StatusCode) {
57 sel …