pub struct CompressionOptions {
pub preferred: PreferredCompression,
pub zstd_level: i32,
pub brotli_level: u32,
pub gzip_level: u32,
}
Expand description
Some options for how to compress the response.
Fields§
§preferred: PreferredCompression
The preferred compression algorithm.
zstd_level: i32
Available on crate feature
zstd
only.The level of zstd compression.
0
means that the C zstd library decides the default.
Note that this can be negative.
See https://facebook.github.io/zstd/ for more context.
brotli_level: u32
Available on crate feature
br
only.The level of zstd compression.
See some benchmarks for more context.
gzip_level: u32
Available on crate feature
gzip
only.The level of gzip compression.
See some benchmarks for more context.
Implementations§
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 moreAuto 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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)