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§
Sourcefn commit(&self, batch: StorageBatch) -> Result<()>
fn commit(&self, batch: StorageBatch) -> Result<()>
Commit a batch of operations atomically.
Provided Methods§
Sourcefn batch(&self) -> StorageBatch
fn batch(&self) -> StorageBatch
Create a new batch for this store.