Struct http_cache::HttpResponse
source · [−]pub struct HttpResponse {
pub body: Vec<u8>,
pub headers: HashMap<String, String>,
pub status: u16,
pub url: Url,
pub version: HttpVersion,
}Expand description
A basic generic type that represents an HTTP response
Fields
body: Vec<u8>HTTP response body
headers: HashMap<String, String>HTTP response headers
status: u16HTTP response status code
url: UrlHTTP response url
version: HttpVersionHTTP response version
Implementations
Returns the status code of the warning header if present
Adds a warning header to a response
Removes a warning header from a response
Update the headers from http::response::Parts
Checks if the Cache-Control header contains the must-revalidate directive
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for HttpResponse
impl Send for HttpResponse
impl Sync for HttpResponse
impl Unpin for HttpResponse
impl UnwindSafe for HttpResponse
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more