Trait fedimint_core::db::IDatabaseTransaction

source ·
pub trait IDatabaseTransaction: MaybeSend + IDatabaseTransactionOps + Debug {
    // Required methods
    fn commit_tx<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn prefix_len(&self) -> usize;
}
Expand description

Fedimint database transaction

See IDatabase for more info.

Required Methods§

source

fn commit_tx<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Commit the transaction

source

fn prefix_len(&self) -> usize

The prefix len of this database instance

Implementations on Foreign Types§

source§

impl<'a, T> IDatabaseTransaction for &'a mut T

source§

fn commit_tx<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn prefix_len(&self) -> usize

source§

impl<T> IDatabaseTransaction for Box<T>

source§

fn commit_tx<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn prefix_len(&self) -> usize

Implementors§