Struct trillium_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); res.insert_header(&encoding, &encoding); let encoding = ContentEncoding::from_headers(res)?.unwrap(); assert_eq!(encoding, &Encoding::Gzip);
Implementations
Trait Implementations
Performs the conversion.
Performs the conversion.
Access the header’s name.
Access the header’s value.
Auto Trait Implementations
impl RefUnwindSafe for ContentEncodingimpl Send for ContentEncodingimpl Sync for ContentEncodingimpl Unpin for ContentEncodingimpl UnwindSafe for ContentEncoding