pub fn parse(s: &str) -> Result<ContentEncoding, HttpError> {
        match s {
            "br" => Ok(ContentEncoding::Brotli),
            "gzip" => Ok(ContentEncoding::Gzip),
            "deflate" => Ok(ContentEncoding::Deflate),
            "identity" => Ok(ContentEncoding::Identity),
            v => Err(HttpError::UnsupportedContentEncoding {
                description: v.to_string(),
            }),
        }
    }
/// Returns an encoding from an HTTP header value.
///
/// # Arguments
///
/// * `s` - A Content-Encoding header value
Returns an encoding from an HTTP header value.
Returns an encoding from an HTTP header value .
pub fn parse(s: &str) -> Result<ContentEncoding, HttpError> {
        match s {
            "br" => Ok(ContentEncoding::Brotli),
            "gzip" => Ok(ContentEncoding::Gzip),
            "deflate" => Ok(ContentEncoding::Deflate),
            "identity" => Ok(ContentEncoding::Identity),
            v => Err(HttpError::UnsupportedContentEncoding {
                description: v.to_string(),
            }),
        }
    }
pub fn parse ( s : & str ) -> Result < ContentEncoding , HttpError > { match s { " " => Ok ( ContentEncoding :: Brotli ) , " " => Ok ( ContentEncoding :: Gzip ) , " " => Ok ( ContentEncoding :: Deflate ) , " " => Ok ( ContentEncoding :: Identity ) , v => Err ( HttpError :: UnsupportedContentEncoding { description : v . to_string ( ) , } ) , } }
Returns an encoding from an HTTP header value.
Returns an encoding from an HTTP header value .
s
&str