Enum CompressionCache
pub enum CompressionCache {
Disabled,
Enabled(CompressionCacheInner),
}Available on crate feature
tls only.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§
§impl CompressionCache
impl CompressionCache
pub fn new(size: usize) -> CompressionCache
Available on crate feature std only.
pub fn new(size: usize) -> CompressionCache
std only.Make a CompressionCache that stores up to size compressed
certificate messages.
Trait Implementations§
§impl Debug for CompressionCache
impl Debug for CompressionCache
§impl Default for CompressionCache
impl Default for CompressionCache
§fn default() -> CompressionCache
fn default() -> CompressionCache
Returns the “default value” for a type. Read more
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more