Struct tower_http::decompression::DecompressionLayer
source · [−]pub struct DecompressionLayer { /* private fields */ }
decompression
only.Expand description
Decompresses response bodies of the underlying service.
This adds the Accept-Encoding
header to requests and transparently decompresses response
bodies based on the Content-Encoding
header.
See the module docs for more details.
Implementations
This is supported on crate feature decompression-gzip
only.
decompression-gzip
only.Sets whether to request the gzip encoding.
This is supported on crate feature decompression-deflate
only.
decompression-deflate
only.Sets whether to request the Deflate encoding.
This is supported on crate feature decompression-br
only.
decompression-br
only.Sets whether to request the Brotli encoding.
Disables the gzip encoding.
This method is available even if the gzip
crate feature is disabled.
Disables the Deflate encoding.
This method is available even if the deflate
crate feature is disabled.
Trait Implementations
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for DecompressionLayer
impl Send for DecompressionLayer
impl Sync for DecompressionLayer
impl Unpin for DecompressionLayer
impl UnwindSafe for DecompressionLayer
Blanket Implementations
Mutably borrows from an owned value. Read more
follow-redirect
only.Create a new Policy
that returns Action::Follow
only if self
and other
return
Action::Follow
. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more