pub struct DBWriteOptions { /* private fields */ }
Expand description
This structure represents options that can be used when writing to a LevelDB instance.
Implementations§
Source§impl DBWriteOptions
impl DBWriteOptions
Sourcepub fn new() -> Option<DBWriteOptions>
pub fn new() -> Option<DBWriteOptions>
Create and return a new DBWriteOptions instance. Returns None
if the
underlying library call returns a null pointer.
Sourcepub fn set_sync(&mut self, val: bool) -> &mut DBWriteOptions
pub fn set_sync(&mut self, val: bool) -> &mut DBWriteOptions
Set whether the write will be flushed to disk before the write is
considered “complete”. Essentially, if a write is performed without
this value set, it has the same semantics as the write()
syscall. If
sync is set, the semantics are the same as a write()
followed by a
fsync()
call.
The default value is false.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DBWriteOptions
impl RefUnwindSafe for DBWriteOptions
impl !Send for DBWriteOptions
impl !Sync for DBWriteOptions
impl Unpin for DBWriteOptions
impl UnwindSafe for DBWriteOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more