#[non_exhaustive]pub struct CompressionOptions { /* private fields */ }
Expand description
Options for configuring request compression.
Implementations§
source§impl CompressionOptions
impl CompressionOptions
sourcepub fn min_compression_size_bytes(&self) -> u32
pub fn min_compression_size_bytes(&self) -> u32
The minimum size of data to compress.
Data smaller than this will not be compressed.
sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Whether compression is enabled.
sourcepub fn with_enabled(self, enabled: bool) -> Self
pub fn with_enabled(self, enabled: bool) -> Self
Set whether compression is enabled.
sourcepub fn with_level(self, level: u32) -> Result<Self, BoxError>
pub fn with_level(self, level: u32) -> Result<Self, BoxError>
Set the compression level.
Valid values are 0..=9
with lower values configuring less (but faster) compression
sourcepub fn with_min_compression_size_bytes(
self,
min_compression_size_bytes: u32,
) -> Result<Self, BoxError>
pub fn with_min_compression_size_bytes( self, min_compression_size_bytes: u32, ) -> Result<Self, BoxError>
Set the minimum size of data to compress.
Data smaller than this will not be compressed.
Valid values are 0..=10_485_760
. The default is 10_240
.
Trait Implementations§
source§impl Clone for CompressionOptions
impl Clone for CompressionOptions
source§fn clone(&self) -> CompressionOptions
fn clone(&self) -> CompressionOptions
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CompressionOptions
impl Debug for CompressionOptions
source§impl Default for CompressionOptions
impl Default for CompressionOptions
source§impl PartialEq for CompressionOptions
impl PartialEq for CompressionOptions
source§fn eq(&self, other: &CompressionOptions) -> bool
fn eq(&self, other: &CompressionOptions) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Storable for CompressionOptions
impl Storable for CompressionOptions
§type Storer = StoreReplace<CompressionOptions>
type Storer = StoreReplace<CompressionOptions>
Specify how an item is stored in the config bag, e.g.
StoreReplace
and StoreAppend
impl Eq for CompressionOptions
impl StructuralPartialEq for CompressionOptions
Auto Trait Implementations§
impl Freeze for CompressionOptions
impl RefUnwindSafe for CompressionOptions
impl Send for CompressionOptions
impl Sync for CompressionOptions
impl Unpin for CompressionOptions
impl UnwindSafe for CompressionOptions
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.