Struct rocksdb::FlushOptions

source ·
pub struct FlushOptions { /* private fields */ }
Expand description

Optionally wait for the memtable flush to be performed.

Examples

Manually flushing the memtable:

use rocksdb::{DB, Options, FlushOptions};

let path = "_path_for_rocksdb_storageY2";
{
    let db = DB::open_default(path).unwrap();

    let mut flush_options = FlushOptions::default();
    flush_options.set_wait(true);

    db.flush_opt(&flush_options);
}
let _ = DB::destroy(&Options::default(), path);

Implementations§

Waits until the flush is done.

Default: true

Examples
use rocksdb::FlushOptions;

let mut options = FlushOptions::default();
options.set_wait(false);

Trait Implementations§

Returns the “default value” for a type. Read more
Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.