Skip to main content

MessageTransactions

Trait MessageTransactions 

Source
pub trait MessageTransactions: Send + Sync {
    // Required methods
    fn begin<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        calls: &'life1 CallSlot,
        scope: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), FaucetError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn commit<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        calls: &'life1 CallSlot,
        scope: &'life2 str,
        token: &'life3 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), FaucetError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn abort<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        calls: &'life1 CallSlot,
        scope: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn last_token<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        calls: &'life1 CallSlot,
        scope: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<String>, FaucetError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

A producer’s transaction primitives. With them, MessageSinkDriver commits a page’s messages and its commit token in one transaction.

Required Methods§

Source

fn begin<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, calls: &'life1 CallSlot, scope: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<(), FaucetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Start a transaction for scope.

Source

fn commit<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, calls: &'life1 CallSlot, scope: &'life2 str, token: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<(), FaucetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Record token for scope inside the open transaction and commit everything published since begin.

Source

fn abort<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, calls: &'life1 CallSlot, scope: &'life2 str, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Abandon the open transaction; nothing published in it becomes visible.

Source

fn last_token<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, calls: &'life1 CallSlot, scope: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Option<String>, FaucetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

The last token committed for scope.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§