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: PreferredCompressionThe preferred compression algorithm.
zstd_level: i32Available 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: u32Available on crate feature
br only.The level of zstd compression.
See some benchmarks for more context.
gzip_level: u32Available 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