[][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 path of the database

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

Finalize the configuration.

number of io buffers

number of io buffers

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

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

b-link tree node size in bytes before splitting

b-link tree node size in bytes before splitting

page consolidation threshold

page consolidation threshold

if this database should be removed after the ConfigBuilder is dropped

if this database should be removed after the ConfigBuilder is dropped

whether to run in read-only mode

whether to run in read-only mode

log base 2 of the number of cache shards

log base 2 of the number of cache shards

maximum size for the system page cache

maximum size for the system page cache

whether to use zstd compression

whether to use zstd compression

the compression factor to use with zstd compression

the compression factor to use with zstd compression

number of ms between IO buffer flushes

number of ms between IO buffer flushes

number of operations between page table snapshots

number of operations between page table snapshots

the proportion of remaining valid pages in the segment

the proportion of remaining valid pages in the segment

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

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

the file segment selection mode

the file segment selection mode

snapshot file location

snapshot file location

print a performance profile when the Config is dropped

print a performance profile when the Config is dropped

Trait Implementations

impl Clone for ConfigBuilder
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Default for ConfigBuilder
[src]

Returns the "default value" for a type. Read more

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

Deserialize this value from the given Serde deserializer. Read more

impl Serialize for ConfigBuilder
[src]

Serialize this value into the given Serde serializer. Read more

impl PartialEq<ConfigBuilder> for ConfigBuilder
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Debug for ConfigBuilder
[src]

Formats the value using the given formatter. Read more

impl Send for ConfigBuilder
[src]

Auto Trait Implementations

Blanket Implementations

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

Performs the conversion.

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

Creates owned data from borrowed data, usually by cloning. Read more

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

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T> From for T
[src]

Performs the conversion.

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.

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

Performs the conversion.

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

Immutably borrows from an owned value. Read more

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

Mutably borrows from an owned value. Read more

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.

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

Performs the conversion.

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

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

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more

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