Skip to main content

KeyValueBatch

Trait KeyValueBatch 

Source
pub trait KeyValueBatch {
    // Required methods
    fn put(&mut self, key: &[u8], value: &[u8]) -> StorageBackendResult<()>;
    fn delete(&mut self, key: &[u8]) -> StorageBackendResult<()>;
    fn delete_prefix(&mut self, prefix: &[u8]) -> StorageBackendResult<()>;
    fn commit(self: Box<Self>) -> StorageBackendResult<()>;
}
Expand description

Atomic mutation buffer for a KeyValueStore.

Required Methods§

Source

fn put(&mut self, key: &[u8], value: &[u8]) -> StorageBackendResult<()>

Source

fn delete(&mut self, key: &[u8]) -> StorageBackendResult<()>

Source

fn delete_prefix(&mut self, prefix: &[u8]) -> StorageBackendResult<()>

Source

fn commit(self: Box<Self>) -> StorageBackendResult<()>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§