pub struct Config {Show 15 fields
pub chunk_size: usize,
pub chunking_strategy: ChunkingStrategy,
pub max_links_per_node: usize,
pub hash_algorithm: HashAlgorithm,
pub num_threads: Option<usize>,
pub enable_parallel_chunking: bool,
pub parallel_threshold: usize,
pub enable_pooling: bool,
pub pool_max_size: usize,
pub enable_metrics: bool,
pub metrics_max_samples: usize,
pub verify_blocks: bool,
pub validate_cids: bool,
pub enable_compression: bool,
pub compression_level: u8,
}Expand description
Main configuration for IPFRS operations
Fields§
§chunk_size: usizeSize of each chunk in bytes
chunking_strategy: ChunkingStrategyChunking strategy to use
max_links_per_node: usizeMaximum links per DAG node
hash_algorithm: HashAlgorithmHash algorithm for CID generation
num_threads: Option<usize>Number of threads for parallel operations (None = use all available)
enable_parallel_chunking: boolEnable parallel chunking for large files
parallel_threshold: usizeThreshold for switching to parallel chunking (bytes)
enable_pooling: boolEnable memory pooling for allocations
pool_max_size: usizeMaximum pool size in bytes
enable_metrics: boolEnable metrics collection
metrics_max_samples: usizeMaximum metrics samples to keep
verify_blocks: boolEnable block verification on read
validate_cids: boolEnable CID validation on parse
enable_compression: boolEnable compression for storage
compression_level: u8Compression level (0-9, where 0 is no compression)
Implementations§
Source§impl Config
impl Config
Sourcepub fn high_performance() -> Self
pub fn high_performance() -> Self
Configuration optimized for high performance
Uses SHA3-256 hashing, parallel processing, and larger chunk sizes.
Sourcepub fn storage_optimized() -> Self
pub fn storage_optimized() -> Self
Configuration optimized for storage efficiency
Uses content-defined chunking for better deduplication.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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