Skip to main content

BatchWriter

Trait BatchWriter 

Source
pub trait BatchWriter {
    // Required method
    fn commit(&self, batch: StorageBatch) -> Result<()>;

    // Provided method
    fn batch(&self) -> StorageBatch { ... }
}
Expand description

Trait for stores that support batch writes.

Required Methods§

Source

fn commit(&self, batch: StorageBatch) -> Result<()>

Commit a batch of operations atomically.

Provided Methods§

Source

fn batch(&self) -> StorageBatch

Create a new batch for this store.

Implementors§