pub struct CompressionConfig {
pub threshold_bytes: usize,
pub level: i32,
}Expand description
Write-side compression policy.
Fields§
§threshold_bytes: usizePayloads of at least this many serialized bytes are compressed.
level: i32zstd level, 1..=22.
Implementations§
Source§impl CompressionConfig
impl CompressionConfig
Sourcepub fn validate(&self) -> Result<(), ProtocolError>
pub fn validate(&self) -> Result<(), ProtocolError>
The threshold must be a positive safe integer and the level 1..=22.
Trait Implementations§
Source§impl Clone for CompressionConfig
impl Clone for CompressionConfig
Source§fn clone(&self) -> CompressionConfig
fn clone(&self) -> CompressionConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CompressionConfig
Source§impl Debug for CompressionConfig
impl Debug for CompressionConfig
Source§impl Default for CompressionConfig
impl Default for CompressionConfig
impl Eq for CompressionConfig
Source§impl PartialEq for CompressionConfig
impl PartialEq for CompressionConfig
Source§fn eq(&self, other: &CompressionConfig) -> bool
fn eq(&self, other: &CompressionConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CompressionConfig
Auto Trait Implementations§
impl Freeze for CompressionConfig
impl RefUnwindSafe for CompressionConfig
impl Send for CompressionConfig
impl Sync for CompressionConfig
impl Unpin for CompressionConfig
impl UnsafeUnpin for CompressionConfig
impl UnwindSafe for CompressionConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.