pub enum Compression {
On {
level: i32,
min_len: usize,
},
Off,
}Expand description
Per-collection write-side compression policy. Reads always honor the per-row format byte regardless of policy, so flipping the policy never strands existing rows.
Variants§
On
Compress rows of at least min_len encoded bytes at level, keeping
the result only when it is strictly smaller than storing raw.
Fields
§
level: i32zstd level (see DEFAULT_COMPRESSION_LEVEL).
Off
Never compress. Required for collections whose rows mix user-secret and attacker-influenced bytes (the length side-channel rule above).
Trait Implementations§
Source§impl Clone for Compression
impl Clone for Compression
Source§fn clone(&self) -> Compression
fn clone(&self) -> Compression
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 Compression
Source§impl Debug for Compression
impl Debug for Compression
Source§impl Default for Compression
impl Default for Compression
impl Eq for Compression
Source§impl PartialEq for Compression
impl PartialEq for Compression
impl StructuralPartialEq for Compression
Auto Trait Implementations§
impl Freeze for Compression
impl RefUnwindSafe for Compression
impl Send for Compression
impl Sync for Compression
impl Unpin for Compression
impl UnsafeUnpin for Compression
impl UnwindSafe for Compression
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