Top-level configuration for the system.
let _config = sled::Config::default() .path("/path/to/data".to_owned()) .cache_capacity(10_000_000_000) .flush_every_ms(Some(1000));
Returns a default
Set the path of the database (builder).
Db based on the provided config.
pub fn cache_capacity(self, to: u64) -> Self[src]
maximum size in bytes for the system page cache
specify whether the system should run in "small" or "fast" mode
pub fn use_compression(self, to: bool) -> Self[src]
whether to use zstd compression
pub fn compression_factor(self, to: i32) -> Self[src]
the compression factor to use with zstd compression. Ranges from 1 up to 22. 0 is 'default'. Levels >= 20 are 'ultra'.
deletes the database after drop. if no path is set, uses /dev/shm on linux
pub fn create_new(self, to: bool) -> Self[src]
attempts to exclusively open the database, failing if it already exists
pub fn print_profile_on_drop(self, to: bool) -> Self[src]
print a performance profile when the Config is dropped
impl !RefUnwindSafe for Config
impl !UnwindSafe for Config
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)[src]
type Error = Infallible
The type returned in the event of a conversion error.