pub enum CompressionCache {
Disabled,
Enabled(CompressionCacheInner),
}
Expand description
An LRU cache for compressions.
The prospect of being able to reuse a given compression for many connections
means we can afford to spend more time on that compression (by passing
CompressionLevel::Amortized
to the compressor).
Variants§
Disabled
No caching happens, and compression happens each time using
CompressionLevel::Interactive
.
Enabled(CompressionCacheInner)
Available on crate feature
std
only.Compressions are stored in an LRU cache.
Implementations§
Trait Implementations§
Source§impl Debug for CompressionCache
impl Debug for CompressionCache
Auto Trait Implementations§
impl !Freeze for CompressionCache
impl RefUnwindSafe for CompressionCache
impl Send for CompressionCache
impl Sync for CompressionCache
impl Unpin for CompressionCache
impl UnwindSafe for CompressionCache
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
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 56 bytes
Size for each variant:
Disabled
: 0 bytesEnabled
: 48 bytes