pub struct AdaptiveCompressionConfig {
pub memory_budget: usize,
pub compression_algorithm: CompressionAlgorithm,
pub hierarchical_compression: bool,
pub block_size: usize,
pub compression_threshold: f64,
pub adaptive_compression: bool,
pub cache_size: usize,
pub out_of_core: bool,
pub temp_directory: String,
pub memory_mapping: bool,
}
Expand description
Configuration for adaptive memory compression
Fields§
§memory_budget: usize
Maximum memory budget in bytes
compression_algorithm: CompressionAlgorithm
Compression algorithm to use
hierarchical_compression: bool
Enable hierarchical compression
block_size: usize
Block size for compression
compression_threshold: f64
Compression threshold (compress when usage exceeds this ratio)
adaptive_compression: bool
Enable adaptive compression based on access patterns
cache_size: usize
Cache size for frequently accessed blocks
out_of_core: bool
Enable out-of-core processing
temp_directory: String
Temporary directory for out-of-core storage
memory_mapping: bool
Enable memory mapping
Implementations§
Source§impl AdaptiveCompressionConfig
impl AdaptiveCompressionConfig
Sourcepub fn with_memory_budget(self, budget: usize) -> Self
pub fn with_memory_budget(self, budget: usize) -> Self
Set memory budget
Sourcepub fn with_compression_algorithm(self, algorithm: CompressionAlgorithm) -> Self
pub fn with_compression_algorithm(self, algorithm: CompressionAlgorithm) -> Self
Set compression algorithm
Sourcepub fn with_hierarchical_compression(self, enabled: bool) -> Self
pub fn with_hierarchical_compression(self, enabled: bool) -> Self
Enable or disable hierarchical compression
Sourcepub fn with_block_size(self, size: usize) -> Self
pub fn with_block_size(self, size: usize) -> Self
Set block size for compression
Sourcepub fn with_compression_threshold(self, threshold: f64) -> Self
pub fn with_compression_threshold(self, threshold: f64) -> Self
Set compression threshold
Sourcepub fn with_adaptive_compression(self, enabled: bool) -> Self
pub fn with_adaptive_compression(self, enabled: bool) -> Self
Enable or disable adaptive compression
Sourcepub fn with_cache_size(self, size: usize) -> Self
pub fn with_cache_size(self, size: usize) -> Self
Set cache size
Sourcepub fn with_out_of_core(self, enabled: bool) -> Self
pub fn with_out_of_core(self, enabled: bool) -> Self
Enable or disable out-of-core processing
Sourcepub fn with_temp_directory(self, dir: impl Into<String>) -> Self
pub fn with_temp_directory(self, dir: impl Into<String>) -> Self
Set temporary directory for out-of-core storage
Sourcepub fn with_memory_mapping(self, enabled: bool) -> Self
pub fn with_memory_mapping(self, enabled: bool) -> Self
Enable or disable memory mapping
Sourcepub fn lightweight() -> Self
pub fn lightweight() -> Self
Create a lightweight configuration for testing
Sourcepub fn high_performance() -> Self
pub fn high_performance() -> Self
Create a high-performance configuration
Sourcepub fn memory_efficient() -> Self
pub fn memory_efficient() -> Self
Create a memory-efficient configuration
Trait Implementations§
Source§impl Clone for AdaptiveCompressionConfig
impl Clone for AdaptiveCompressionConfig
Source§fn clone(&self) -> AdaptiveCompressionConfig
fn clone(&self) -> AdaptiveCompressionConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for AdaptiveCompressionConfig
impl Debug for AdaptiveCompressionConfig
Auto Trait Implementations§
impl Freeze for AdaptiveCompressionConfig
impl RefUnwindSafe for AdaptiveCompressionConfig
impl Send for AdaptiveCompressionConfig
impl Sync for AdaptiveCompressionConfig
impl Unpin for AdaptiveCompressionConfig
impl UnwindSafe for AdaptiveCompressionConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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