typed_headers/impls/
accept_encoding.rs

1use http::header::ACCEPT_ENCODING;
2
3use super::{ContentCoding, QualityItem};
4
5header! {
6    /// `Accept-Encoding` header, defined in
7    /// [RFC7231](http://tools.ietf.org/html/rfc7231#section-5.3.4)
8    ///
9    /// The `Accept-Encoding` header field can be used by user agents to
10    /// indicate what response content-codings are
11    /// acceptable in the response.  An  `identity` token is used as a synonym
12    /// for "no encoding" in order to communicate when no encoding is
13    /// preferred.
14    ///
15    /// # ABNF
16    ///
17    /// ```text
18    /// Accept-Encoding  = #( codings [ weight ] )
19    /// codings          = content-coding / "identity" / "*"
20    /// ```
21    ///
22    /// # Example values
23    /// * `compress, gzip`
24    /// * ``
25    /// * `*`
26    /// * `compress;q=0.5, gzip;q=1`
27    /// * `gzip;q=1.0, identity; q=0.5, *;q=0`
28    (AcceptEncoding, ACCEPT_ENCODING) => (QualityItem<ContentCoding>)*
29}