pub trait Datastore {
type Trans: Transaction;
fn transaction(&self) -> Result<Self::Trans>;
fn bulk_insert<I>(&self, items: I) -> Result<()>
where
I: Iterator<Item = BulkInsertItem>,
{ ... }
}
Expand description
Specifies a datastore implementation.
Errors
All methods may return an error if something unexpected happens - e.g. if there was a problem connecting to the underlying database.
Required Associated Types
type Trans: Transaction
Required Methods
sourcefn transaction(&self) -> Result<Self::Trans>
fn transaction(&self) -> Result<Self::Trans>
Creates a new transaction.