Struct sled::ConfigBuilder
[−]
[src]
pub struct ConfigBuilder { /* fields omitted */ }
Top-level configuration for the system.
Examples
let _config = pagecache::ConfigBuilder::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::ConfigBuilder::default() .path("/path/to/data".to_owned()) .read_only(true);
Methods
impl ConfigBuilder
[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) -> ConfigBuilder
[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) -> ConfigBuilder
[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) -> ConfigBuilder
[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) -> ConfigBuilder
[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) -> ConfigBuilder
[src]
Builder, set
fn get_temporary(&self) -> bool
[src]
Get
fn set_temporary(&mut self, to: bool)
[src]
Set
fn temporary(self, to: bool) -> ConfigBuilder
[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) -> ConfigBuilder
[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) -> ConfigBuilder
[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) -> ConfigBuilder
[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) -> ConfigBuilder
[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) -> ConfigBuilder
[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) -> ConfigBuilder
[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>) -> ConfigBuilder
[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) -> ConfigBuilder
[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) -> ConfigBuilder
[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) -> ConfigBuilder
[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) -> ConfigBuilder
[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) -> ConfigBuilder
[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) -> ConfigBuilder
[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>) -> ConfigBuilder
[src]
Builder, set
fn new() -> ConfigBuilder
[src]
Returns a default ConfigBuilder
fn path<P>(self, path: P) -> ConfigBuilder where
P: AsRef<Path>,
[src]
P: AsRef<Path>,
Set the path of the database (builder).
fn set_path<P>(&mut self, path: P) where
P: AsRef<Path>,
[src]
P: AsRef<Path>,
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) -> Config
[src]
Finalize the configuration.
fn log(self) -> Log
[src]
Consumes the ConfigBuilder
and produces a Log
from it.
Trait Implementations
impl Serialize for ConfigBuilder
[src]
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
impl Clone for ConfigBuilder
[src]
fn clone(&self) -> ConfigBuilder
[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
impl Send for ConfigBuilder
[src]
impl PartialEq<ConfigBuilder> for ConfigBuilder
[src]
fn eq(&self, __arg_0: &ConfigBuilder) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ConfigBuilder) -> bool
[src]
This method tests for !=
.
impl Debug for ConfigBuilder
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter.
impl<'de> Deserialize<'de> for ConfigBuilder
[src]
fn deserialize<__D>(
__deserializer: __D
) -> Result<ConfigBuilder, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]
__deserializer: __D
) -> Result<ConfigBuilder, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
impl Default for ConfigBuilder
[src]
fn default() -> ConfigBuilder
[src]
Returns the "default value" for a type. Read more