Trait fedimint_core::db::IRawDatabase
source · pub trait IRawDatabase: Debug + MaybeSend + MaybeSync + 'static {
type Transaction<'a>: IRawDatabaseTransaction;
// Required method
fn begin_transaction<'a, 'async_trait>(
&'a self
) -> Pin<Box<dyn Future<Output = Self::Transaction<'a>> + Send + 'async_trait>>
where Self: 'async_trait,
'a: 'async_trait;
}
Expand description
Raw database implementation
This and IRawDatabaseTransaction
are meant to be implemented
by crates like fedimint-rocksdb
to provide a concrete implementation
of a database to be used by Fedimint.
This is in contrast of IDatabase
which includes extra
functionality that Fedimint needs (and adds) on top of it.
Required Associated Types§
sourcetype Transaction<'a>: IRawDatabaseTransaction
type Transaction<'a>: IRawDatabaseTransaction
A raw database transaction type
Required Methods§
sourcefn begin_transaction<'a, 'async_trait>(
&'a self
) -> Pin<Box<dyn Future<Output = Self::Transaction<'a>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
fn begin_transaction<'a, 'async_trait>( &'a self ) -> Pin<Box<dyn Future<Output = Self::Transaction<'a>> + Send + 'async_trait>>where Self: 'async_trait, 'a: 'async_trait,
Start a database transaction
Object Safety§
This trait is not object safe.