[][src]Struct mappum_rocksdb::WriteOptions

pub struct WriteOptions { /* fields omitted */ }

Optionally disable WAL or sync for this write.

Examples

Making an unsafe write of a batch:

use rocksdb::{DB, Options, WriteBatch, WriteOptions};

let path = "_path_for_rocksdb_storageY";
{
    let db = DB::open_default(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);
}
let _ = DB::destroy(&Options::default(), path);

Methods

impl WriteOptions[src]

pub fn new() -> WriteOptions[src]

pub fn set_sync(&mut self, sync: bool)[src]

pub fn disable_wal(&mut self, disable: bool)[src]

Trait Implementations

impl Default for WriteOptions[src]

impl Drop for WriteOptions[src]

impl Send for WriteOptions[src]

impl Sync for WriteOptions[src]

Auto Trait Implementations

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.