Skip to main content

OutboxTx

Trait OutboxTx 

Source
pub trait OutboxTx: Send {
    // Required methods
    fn enqueue<'a>(
        &'a mut self,
        entry: OutboxEntry,
    ) -> Pin<Box<dyn Future<Output = Result<(), DataError>> + Send + 'a>>;
    fn commit(
        self: Box<Self>,
    ) -> Pin<Box<dyn Future<Output = Result<(), DataError>> + Send>>;
    fn rollback(
        self: Box<Self>,
    ) -> Pin<Box<dyn Future<Output = Result<(), DataError>> + Send>>;
}
Expand description

A live database transaction that can also enqueue outbox entries.

Required Methods§

Source

fn enqueue<'a>( &'a mut self, entry: OutboxEntry, ) -> Pin<Box<dyn Future<Output = Result<(), DataError>> + Send + 'a>>

INSERT into the outbox table under THIS transaction — atomic with the business write. Visible to the relay only after commit.

Source

fn commit( self: Box<Self>, ) -> Pin<Box<dyn Future<Output = Result<(), DataError>> + Send>>

Source

fn rollback( self: Box<Self>, ) -> Pin<Box<dyn Future<Output = Result<(), DataError>> + Send>>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§