Enum tower_http::CompressionLevel
source · #[non_exhaustive]pub enum CompressionLevel {
Fastest,
Best,
Default,
Precise(u32),
}
Available on crate features
compression-br
or compression-deflate
or compression-gzip
or compression-zstd
or decompression-br
or decompression-deflate
or decompression-gzip
or decompression-zstd
only.Expand description
Level of compression data should be compressed with.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Fastest
Fastest quality of compression, usually produces bigger size.
Best
Best quality of compression, usually produces the smallest size.
Default
Default quality of compression defined by the selected compression algorithm.
Precise(u32)
Precise quality based on the underlying compression algorithms’ qualities. The interpretation of this depends on the algorithm chosen and the specific implementation backing it. Qualities are implicitly clamped to the algorithm’s maximum.
Trait Implementations§
source§impl Clone for CompressionLevel
impl Clone for CompressionLevel
source§fn clone(&self) -> CompressionLevel
fn clone(&self) -> CompressionLevel
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 CompressionLevel
impl Debug for CompressionLevel
source§impl Default for CompressionLevel
impl Default for CompressionLevel
source§impl PartialEq<CompressionLevel> for CompressionLevel
impl PartialEq<CompressionLevel> for CompressionLevel
source§fn eq(&self, other: &CompressionLevel) -> bool
fn eq(&self, other: &CompressionLevel) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for CompressionLevel
impl Eq for CompressionLevel
impl StructuralEq for CompressionLevel
impl StructuralPartialEq for CompressionLevel
Auto Trait Implementations§
impl RefUnwindSafe for CompressionLevel
impl Send for CompressionLevel
impl Sync for CompressionLevel
impl Unpin for CompressionLevel
impl UnwindSafe for CompressionLevel
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