Skip to main content

EventPublisher

Trait EventPublisher 

Source
pub trait EventPublisher: Send + Sync {
    // Required method
    fn publish<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        snapshot: &'life1 RuntimeSnapshot,
        event: &'life2 DurableEvent,
    ) -> Pin<Box<dyn Future<Output = Result<(), ExternalError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Delivery boundary for events that have already been durably committed.

Required Methods§

Source

fn publish<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, snapshot: &'life1 RuntimeSnapshot, event: &'life2 DurableEvent, ) -> Pin<Box<dyn Future<Output = Result<(), ExternalError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Publishes one committed stable-boundary event with at-least-once delivery semantics.

snapshot is the exact Runtime generation committed with event. Implementations must never reload a newer snapshot while encoding the event.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§