Struct tower_http::decompression::DecompressionLayer [−][src]
pub struct DecompressionLayer { /* fields omitted */ }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
impl DecompressionLayer[src]
impl DecompressionLayer[src]pub fn gzip(self, enable: bool) -> Self[src]
This is supported on crate feature decompression-gzip only.
pub fn gzip(self, enable: bool) -> Self[src]decompression-gzip only.Sets whether to request the gzip encoding.
pub fn deflate(self, enable: bool) -> Self[src]
This is supported on crate feature decompression-deflate only.
pub fn deflate(self, enable: bool) -> Self[src]decompression-deflate only.Sets whether to request the Deflate encoding.
pub fn br(self, enable: bool) -> Self[src]
This is supported on crate feature decompression-br only.
pub fn br(self, enable: bool) -> Self[src]decompression-br only.Sets whether to request the Brotli encoding.
pub fn no_gzip(self) -> Self[src]
pub fn no_gzip(self) -> Self[src]Disables the gzip encoding.
This method is available even if the gzip crate feature is disabled.
pub fn no_deflate(self) -> Self[src]
pub fn no_deflate(self) -> Self[src]Disables the Deflate encoding.
This method is available even if the deflate crate feature is disabled.
Trait Implementations
impl Clone for DecompressionLayer[src]
impl Clone for DecompressionLayer[src]fn clone(&self) -> DecompressionLayer[src]
fn clone(&self) -> DecompressionLayer[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]Performs copy-assignment from source. Read more
impl Debug for DecompressionLayer[src]
impl Debug for DecompressionLayer[src]impl Default for DecompressionLayer[src]
impl Default for DecompressionLayer[src]fn default() -> DecompressionLayer[src]
fn default() -> DecompressionLayer[src]Returns the “default value” for a type. Read more
impl<S> Layer<S> for DecompressionLayer[src]
impl<S> Layer<S> for DecompressionLayer[src]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
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T[src]
impl<T> Instrument for T[src]fn instrument(self, span: Span) -> Instrumented<Self>[src]
fn instrument(self, span: Span) -> Instrumented<Self>[src]Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>[src]
fn in_current_span(self) -> Instrumented<Self>[src]impl<T> PolicyExt for T where
T: ?Sized, [src]
impl<T> PolicyExt for T where
T: ?Sized, [src]impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more