pub struct CompressionConfig {
pub compression_type: CompressionType,
pub threshold: usize,
}Expand description
Compression configuration for the storage engine
Fields§
§compression_type: CompressionTypeThe compression algorithm to use
threshold: usizeMinimum page data size to compress (smaller pages are stored uncompressed) Default: 512 bytes
Implementations§
Source§impl CompressionConfig
impl CompressionConfig
Sourcepub fn zstd_level(level: i32) -> Self
pub fn zstd_level(level: i32) -> Self
Create a compression config with ZSTD at specified level
Sourcepub fn with_threshold(self, threshold: usize) -> Self
pub fn with_threshold(self, threshold: usize) -> Self
Set the compression threshold
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Check if compression is enabled
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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CompressionConfig
impl Debug 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