sui_indexer_alt_framework::store

Trait TransactionalStore

Source
pub trait TransactionalStore: Store {
    // Required method
    fn transaction<'a, 'life0, 'async_trait, R, F>(
        &'life0 self,
        f: F,
    ) -> Pin<Box<dyn Future<Output = Result<R>> + Send + 'async_trait>>
       where R: Send + 'a + 'async_trait,
             F: Send + 'a + for<'r> FnOnce(&'r mut Self::Connection<'_>) -> ScopedBoxFuture<'a, 'r, Result<R>> + 'async_trait,
             Self: 'async_trait,
             'a: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Extends the Store trait with transactional capabilities, to be used within the framework for atomic or transactional writes.

Required Methods§

Source

fn transaction<'a, 'life0, 'async_trait, R, F>( &'life0 self, f: F, ) -> Pin<Box<dyn Future<Output = Result<R>> + Send + 'async_trait>>
where R: Send + 'a + 'async_trait, F: Send + 'a + for<'r> FnOnce(&'r mut Self::Connection<'_>) -> ScopedBoxFuture<'a, 'r, Result<R>> + 'async_trait, Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl TransactionalStore for Db

Source§

fn transaction<'a, 'life0, 'async_trait, R, F>( &'life0 self, f: F, ) -> Pin<Box<dyn Future<Output = Result<R>> + Send + 'async_trait>>
where R: Send + 'a + 'async_trait, F: Send + 'a + for<'r> FnOnce(&'r mut Self::Connection<'_>) -> ScopedBoxFuture<'a, 'r, Result<R>> + 'async_trait, Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait,

Implementors§