[][src]Struct sled::ConfigBuilder

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 = pagecache::ConfigBuilder::default()
    .path("/path/to/data".to_owned())
    .read_only(true);

Methods

impl ConfigBuilder
[src]

Returns a default ConfigBuilder

Set the path of the database (builder).

Set the merge operator that can be relied on during merges in the PageCache.

Finalize the configuration.

number of io buffers

size of each io flush buffer. MUST be multiple of 512!

b-link tree node size in bytes before splitting

page consolidation threshold

deletes the database after drop. if no path is set, uses /dev/shm on linux

whether to run in read-only mode

log base 2 of the number of cache shards

maximum size for the system page cache

whether to use zstd compression

the compression factor to use with zstd compression

number of ms between IO buffer flushes

number of operations between page table snapshots

the proportion of remaining valid pages in the segment

the cleanup threshold skew in percentage points between the first and last segments

the file segment selection mode

snapshot file location

print a performance profile when the Config is dropped

Trait Implementations

impl PartialEq<ConfigBuilder> for ConfigBuilder
[src]

impl Clone for ConfigBuilder
[src]

Performs copy-assignment from source. Read more

impl Send for ConfigBuilder
[src]

impl Default for ConfigBuilder
[src]

impl Serialize for ConfigBuilder
[src]

impl<'de> Deserialize<'de> for ConfigBuilder
[src]

impl Debug for ConfigBuilder
[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]