#[non_exhaustive]pub enum CompressionLevel {
Fastest,
Best,
Default,
Precise(i32),
}
Available on (crate features
compression-br
or compression-deflate
or compression-gzip
or compression-zstd
) and (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(i32)
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§fn default() -> CompressionLevel
fn default() -> CompressionLevel
Returns the “default value” for a type. Read more
Source§impl PartialEq for CompressionLevel
impl PartialEq for CompressionLevel
impl Copy for CompressionLevel
impl Eq for CompressionLevel
impl StructuralPartialEq for CompressionLevel
Auto Trait Implementations§
impl Freeze for CompressionLevel
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