Skip to main content

OutboxTx

Trait OutboxTx 

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

A live database transaction that can also enqueue outbox entries.

Required Methods§

Source

fn enqueue<'a>( &'a mut self, entry: OutboxEntry, ) -> BoxFuture<'a, Result<(), DataError>>

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>) -> BoxFuture<'static, Result<(), DataError>>

Source

fn rollback(self: Box<Self>) -> BoxFuture<'static, Result<(), DataError>>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§