Struct exonum_rocksdb::WriteOptions
[−]
[src]
pub struct WriteOptions { /* fields omitted */ }
Optionally disable WAL or sync for this write.
Examples
Making an unsafe write of a batch:
extern crate tempdir; extern crate exonum_rocksdb; use exonum_rocksdb::{DB, WriteBatch, WriteOptions}; use tempdir::TempDir; let temp_dir = TempDir::new("storageY").unwrap(); let db = DB::open_default(temp_dir.path()).unwrap(); let mut batch = WriteBatch::default(); batch.put(b"my key", b"my value"); batch.put(b"key2", b"value2"); batch.put(b"key3", b"value3"); let mut write_options = WriteOptions::default(); write_options.set_sync(false); write_options.disable_wal(true); db.write_opt(batch, &write_options);
Methods
impl WriteOptions
[src]
fn new() -> WriteOptions
[src]
fn set_sync(&mut self, sync: bool)
[src]
fn disable_wal(&mut self, disable: bool)
[src]
Trait Implementations
impl Drop for WriteOptions
[src]
impl Default for WriteOptions
[src]
fn default() -> WriteOptions
[src]
Returns the "default value" for a type. Read more