Skip to main content

OutboxWriter

Trait OutboxWriter 

Source
pub trait OutboxWriter<P>
where P: Debug + Clone + Serialize + Send + Sync,
{ // Required method fn insert_event<'life0, 'async_trait>( &'life0 self, event: Event<P>, ) -> Pin<Box<dyn Future<Output = Result<(), OutboxError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; }
Expand description

Producer-side storage contract.

Separated from OutboxStorage so a service that only writes events can depend on the narrow surface it actually uses.

Required Methods§

Source

fn insert_event<'life0, 'async_trait>( &'life0 self, event: Event<P>, ) -> Pin<Box<dyn Future<Output = Result<(), OutboxError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Persists a single Event row in the outbox table.

Called by OutboxService::add_event after any configured idempotency reservation has succeeded.

§Errors

Returns an OutboxError if the insert fails — typically a DatabaseError on a unique-constraint violation or connection issue.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§