Crate accept_encoding

Source
Expand description

§Example

use http::header::{HeaderMap, HeaderValue, ACCEPT_ENCODING};

let mut headers = HeaderMap::new();
headers.insert(ACCEPT_ENCODING, HeaderValue::from_str("gzip, deflate, br")?);

let encoding = accept_encoding::parse(&headers)?;
assert!(encoding.is_brotli());

Structs§

Error
A specialized Error type for this crate’s operations.

Enums§

Encoding
Encoding levels.
ErrorKind
A list enumerating the categories of errors in this crate.

Functions§

parse
Parse a set of HTTP headers into an Encoding.

Type Aliases§

Result
A specialized Result type for this crate’s operations.