Struct pagecache::Config
[−]
[src]
pub struct Config { /* fields omitted */ }
Top-level configuration for the system.
Examples
let _config = sled::Config::default() .path("/path/to/data".to_owned()) .cache_capacity(10_000_000_000) .use_compression(true) .flush_every_ms(Some(1000)) .snapshot_after_ops(100_000);
Read-only mode
let _config = sled::Config::default() .path("/path/to/data".to_owned()) .read_only(true);
Methods
impl Config
[src]
fn get_io_bufs(&self) -> usize
[src]
Get
fn set_io_bufs(&mut self, to: usize)
[src]
Set
fn io_bufs(self, to: usize) -> Config
[src]
Builder, set
fn get_io_buf_size(&self) -> usize
[src]
Get
fn set_io_buf_size(&mut self, to: usize)
[src]
Set
fn io_buf_size(self, to: usize) -> Config
[src]
Builder, set
fn get_min_items_per_segment(&self) -> usize
[src]
Get
fn set_min_items_per_segment(&mut self, to: usize)
[src]
Set
fn min_items_per_segment(self, to: usize) -> Config
[src]
Builder, set
fn get_blink_fanout(&self) -> usize
[src]
Get
fn set_blink_fanout(&mut self, to: usize)
[src]
Set
fn blink_fanout(self, to: usize) -> Config
[src]
Builder, set
fn get_page_consolidation_threshold(&self) -> usize
[src]
Get
fn set_page_consolidation_threshold(&mut self, to: usize)
[src]
Set
fn page_consolidation_threshold(self, to: usize) -> Config
[src]
Builder, set
fn get_temporary(&self) -> bool
[src]
Get
fn set_temporary(&mut self, to: bool)
[src]
Set
fn temporary(self, to: bool) -> Config
[src]
Builder, set
fn get_read_only(&self) -> bool
[src]
Get
fn set_read_only(&mut self, to: bool)
[src]
Set
fn read_only(self, to: bool) -> Config
[src]
Builder, set
fn get_cache_bits(&self) -> usize
[src]
Get
fn set_cache_bits(&mut self, to: usize)
[src]
Set
fn cache_bits(self, to: usize) -> Config
[src]
Builder, set
fn get_cache_capacity(&self) -> usize
[src]
Get
fn set_cache_capacity(&mut self, to: usize)
[src]
Set
fn cache_capacity(self, to: usize) -> Config
[src]
Builder, set
fn get_use_os_cache(&self) -> bool
[src]
Get
fn set_use_os_cache(&mut self, to: bool)
[src]
Set
fn use_os_cache(self, to: bool) -> Config
[src]
Builder, set
fn get_use_compression(&self) -> bool
[src]
Get
fn set_use_compression(&mut self, to: bool)
[src]
Set
fn use_compression(self, to: bool) -> Config
[src]
Builder, set
fn get_zstd_compression_factor(&self) -> i32
[src]
Get
fn set_zstd_compression_factor(&mut self, to: i32)
[src]
Set
fn zstd_compression_factor(self, to: i32) -> Config
[src]
Builder, set
fn get_flush_every_ms(&self) -> Option<u64>
[src]
Get
fn set_flush_every_ms(&mut self, to: Option<u64>)
[src]
Set
fn flush_every_ms(self, to: Option<u64>) -> Config
[src]
Builder, set
fn get_snapshot_after_ops(&self) -> usize
[src]
Get
fn set_snapshot_after_ops(&mut self, to: usize)
[src]
Set
fn snapshot_after_ops(self, to: usize) -> Config
[src]
Builder, set
fn get_cache_fixup_threshold(&self) -> usize
[src]
Get
fn set_cache_fixup_threshold(&mut self, to: usize)
[src]
Set
fn cache_fixup_threshold(self, to: usize) -> Config
[src]
Builder, set
fn get_segment_cleanup_threshold(&self) -> f64
[src]
Get
fn set_segment_cleanup_threshold(&mut self, to: f64)
[src]
Set
fn segment_cleanup_threshold(self, to: f64) -> Config
[src]
Builder, set
fn get_min_free_segments(&self) -> usize
[src]
Get
fn set_min_free_segments(&mut self, to: usize)
[src]
Set
fn min_free_segments(self, to: usize) -> Config
[src]
Builder, set
fn get_zero_copy_storage(&self) -> bool
[src]
Get
fn set_zero_copy_storage(&mut self, to: bool)
[src]
Set
fn zero_copy_storage(self, to: bool) -> Config
[src]
Builder, set
fn get_segment_mode(&self) -> SegmentMode
[src]
Get
fn set_segment_mode(&mut self, to: SegmentMode)
[src]
Set
fn segment_mode(self, to: SegmentMode) -> Config
[src]
Builder, set
fn get_snapshot_path(&self) -> Option<OsString>
[src]
Get
fn set_snapshot_path(&mut self, to: Option<OsString>)
[src]
Set
fn snapshot_path(self, to: Option<OsString>) -> Config
[src]
Builder, set
fn new() -> Config
[src]
Returns a default Config
fn path<P: AsRef<Path>>(self, path: P) -> Config
[src]
Set the path of the database
fn get_path(&self) -> OsString
[src]
Get the path of the database
fn snapshot_prefix(&self) -> OsString
[src]
returns the current snapshot file prefix
fn get_snapshot_files(&self) -> Vec<PathBuf>
[src]
returns the snapshot file paths for this system
fn build(self) -> FinalConfig
[src]
Finalize the configuration.
fn log(self) -> Log
[src]
Consumes the Config
and produces a Log
from it.
Trait Implementations
impl Debug for Config
[src]
impl PartialEq for Config
[src]
fn eq(&self, __arg_0: &Config) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Config) -> bool
[src]
This method tests for !=
.
impl Clone for Config
[src]
fn clone(&self) -> Config
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more