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

A specialized Error type for this crate’s operations.

Enums

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

Functions

Parse a set of HTTP headers into an Encoding.

Type Definitions

A specialized Result type for this crate’s operations.