pub trait BatchDatabase: Database {
    type Batch: BatchOperations;

    // Required methods
    fn begin_batch(&self) -> Self::Batch;
    fn commit_batch(&mut self, batch: Self::Batch) -> Result<(), Error>;
}
Expand description

Trait for a database that supports batch operations

This trait defines the methods to start and apply a batch of operations.

Required Associated Types§

source

type Batch: BatchOperations

Container for the operations

Required Methods§

source

fn begin_batch(&self) -> Self::Batch

Create a new batch container

source

fn commit_batch(&mut self, batch: Self::Batch) -> Result<(), Error>

Consume and apply a batch of operations

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl BatchDatabase for Tree

§

type Batch = Batch

source§

fn begin_batch(&self) -> Self::Batch

source§

fn commit_batch(&mut self, batch: Self::Batch) -> Result<(), Error>

Implementors§