pub enum CompressionLevel {
Fastest,
Balanced,
Best,
Precise(i32),
}Available on crate feature
compression only.Expand description
The quality a Compression configuration encodes with, trading
compression ratio against CPU time.
Variants§
Fastest
The fastest quality, usually producing the biggest output.
Balanced
A quality suited to compressing responses as they are served.
Balances output size against the CPU time needed for each response.
Best
The best quality, usually producing the smallest output. With brotli this is expensive; prefer it for payloads compressed once and cached.
Precise(i32)
A numeric quality interpreted by each algorithm, clamped to the algorithm’s maximum.
Trait Implementations§
Source§impl Clone for CompressionLevel
impl Clone for CompressionLevel
impl Copy for CompressionLevel
Source§impl Debug for CompressionLevel
impl Debug for CompressionLevel
Source§impl Default for CompressionLevel
impl Default for CompressionLevel
impl Eq for CompressionLevel
Source§impl PartialEq for CompressionLevel
impl PartialEq 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 UnsafeUnpin 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
impl<T> CloneAny for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.