Struct http_types::content::ContentEncoding [−][src]
pub struct ContentEncoding { /* fields omitted */ }
Expand description
Specify the compression algorithm.
Specifications
Examples
use http_types::Response; use http_types::content::{ContentEncoding, Encoding}; let mut encoding = ContentEncoding::new(Encoding::Gzip); let mut res = Response::new(200); encoding.apply(&mut res); let encoding = ContentEncoding::from_headers(res)?.unwrap(); assert_eq!(encoding, &Encoding::Gzip);
Implementations
Create a new instance from headers.
Get the HeaderName
.
Get the HeaderValue
.
Trait Implementations
Performs the conversion.
Performs the conversion.
type Iter = IntoIter<HeaderValue>
type Iter = IntoIter<HeaderValue>
Returned iterator over header values which this type may correspond to.
Converts this object to an iterator of resolved HeaderValues
.