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