Struct leveldb_rs::DBOptions [] [src]

pub struct DBOptions { /* fields omitted */ }

This structure represents options that can be used when constructing a LevelDB instance.

Methods

impl DBOptions
[src]

Create and return a new DBOptions instance. Returns None if the underlying library call returns a null pointer.

Set the comparator to use for this database. By default, LevelDB uses a comparator does a lexicographic comparison. Note also that a comparator must be thread-safe.

Create the database if it's missing when we try to open it.

Default: false

Return an error if the database already exists.

Default: false

If set to true, the library will do aggressive checking of all data that it is processing and will stop early if it detects any errors.

Default: false

Amount of data to build up in memory (backed by an unsorted log on-disk) before converting to a sorted on-disk file.

Default: 4MiB

Number of open files that can be used by the DB. This value should be approximately one open file per 2MB of working set.

Default: 1000

Approximate size of user data packed per block. Note that this corresponds to uncompressed data.

Default: 4KB

Number of keys between restart points for delta encoding of keys. Most clients should not change this parameter.

Default: 16

Trait Implementations

impl Drop for DBOptions
[src]

A method called when the value goes out of scope. Read more