pub trait IRawDatabase:
Debug
+ MaybeSend
+ MaybeSync
+ 'static {
type Transaction<'a>: IRawDatabaseTransaction + Debug;
// Required methods
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;
fn checkpoint(&self, backup_path: &Path) -> Result<()>;
}
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 + Debug
type Transaction<'a>: IRawDatabaseTransaction + Debug
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
fn checkpoint(&self, backup_path: &Path) -> Result<()>
Object Safety§
This trait is not object safe.