pub trait OutboxWriter<P>{
// 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§
Sourcefn 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,
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".