pub struct WriteOptions { /* fields omitted */ }
Optionally disable WAL or sync for this write.
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);
Executes the destructor for this type. Read more
Returns the "default value" for a type. Read more