[][src]Struct rocks::options::Options

pub struct Options { /* fields omitted */ }

Options to control the behavior of a database (passed to DB::Open)

use rocks::options::Options;

let _opt = Options::default()
          .map_db_options(|db| db.create_if_missing(true))
          .map_cf_options(|cf| cf.disable_auto_compactions(true));

Implementations

impl Options[src]

pub fn default_instance() -> &'static Options[src]

default Options with create_if_missing = true

pub fn new(
    dbopt: Option<DBOptions>,
    cfopt: Option<ColumnFamilyOptions>
) -> Options
[src]

pub fn to_cf_options(&self) -> ColumnFamilyOptions[src]

pub fn to_db_options(&self) -> DBOptions[src]

pub fn map_db_options<F: FnOnce(DBOptions) -> DBOptions>(self, f: F) -> Self[src]

Configure DBOptions using builder style.

pub fn map_cf_options<F: FnOnce(ColumnFamilyOptions) -> ColumnFamilyOptions>(
    self,
    f: F
) -> Self
[src]

Configure ColumnFamilyOptions using builder style.

pub fn prepare_for_bulk_load(self) -> Self[src]

Set appropriate parameters for bulk loading.

All data will be in level 0 without any automatic compaction. It's recommended to manually call CompactRange(NULL, NULL) before reading from the database, because otherwise the read can be very slow.

pub fn optimize_for_small_db(self) -> Self[src]

Use this if your DB is very small (like under 1GB) and you don't want to spend lots of memory for memtables.

Trait Implementations

impl AsRef<Options> for Options[src]

impl Default for Options[src]

impl Drop for Options[src]

impl Sync for Options[src]

Auto Trait Implementations

impl RefUnwindSafe for Options

impl !Send for Options

impl Unpin for Options

impl UnwindSafe for Options

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.