/// Constructs a Decoder from a hyper request.
///
/// A decoder is just a wrapper around the hyper request that knows
/// how to decode the content body of the request.
///
/// Uses the correct variant by inspecting the Content-Encoding header.
Constructs a Decoder from a hyper request.
A decoder is just a wrapper around the hyper request that knows
how to decode the content body of the request.

Uses the correct variant by inspecting the Content-Encoding header.
Constructs a Decoder from a hyper request . A decoder is just a wrapper around the hyper request that knows how to decode the content body of the request . Uses the correct variant by inspecting the Content - Encoding header .
pub(super) fn detect(
        _headers: &mut HeaderMap,
        body: Body,
        _accepts: Accepts,
    ) -> Decoder {
        #[cfg(feature = "gzip")]
        {
            if _accepts.gzip && Decoder::detect_gzip(_headers) {
                return Decoder::gzip(body);
            }
        }
        #[cfg(feature = "brotli")]
        {
            if _accepts.brotli && Decoder::detect_brotli(_headers) {
                return Decoder::brotli(body);
            }
        }
        Decoder::plain_text(body)
    }
pub ( super ) fn detect ( _headers : & mut HeaderMap , body : Body , _accepts : Accepts , ) -> Decoder { # [ cfg ( feature " " ) ] { if _accepts . gzip && Decoder :: detect_gzip ( _headers ) { return Decoder :: gzip ( body ) ; } } # [ cfg ( feature " " ) ] { if _accepts . brotli && Decoder :: detect_brotli ( _headers ) { return Decoder :: brotli ( body ) ; } } Decoder :: plain_text ( body ) }
Constructs a Decoder from a hyper request.
Constructs a Decoder from a hyper request .
_headers
&mut HeaderMap
body
Body
_accepts
Accepts