Skip to main content

MessagingPort

Trait MessagingPort 

Source
pub trait MessagingPort: Send + Sync {
    // Required methods
    fn publish_task_dispatched<'life0, 'life1, 'async_trait>(
        &'life0 self,
        event: &'life1 TaskDispatchedEvent,
    ) -> Pin<Box<dyn Future<Output = Result<(), DomainError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn publish_task_completed<'life0, 'life1, 'async_trait>(
        &'life0 self,
        event: &'life1 TaskCompletedEvent,
    ) -> Pin<Box<dyn Future<Output = Result<(), DomainError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn publish_task_failed<'life0, 'life1, 'async_trait>(
        &'life0 self,
        event: &'life1 TaskFailedEvent,
    ) -> Pin<Box<dyn Future<Output = Result<(), DomainError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn publish_deliberation_completed<'life0, 'life1, 'async_trait>(
        &'life0 self,
        event: &'life1 DeliberationCompletedEvent,
    ) -> Pin<Box<dyn Future<Output = Result<(), DomainError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn publish_phase_changed<'life0, 'life1, 'async_trait>(
        &'life0 self,
        event: &'life1 PhaseChangedEvent,
    ) -> Pin<Box<dyn Future<Output = Result<(), DomainError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Publish / subscribe surface. Intentionally narrow: specific publish_* methods per event type enforce that publishing is a first-class, audited action — publishing an arbitrary untyped payload is not possible.

Required Methods§

Source

fn publish_task_dispatched<'life0, 'life1, 'async_trait>( &'life0 self, event: &'life1 TaskDispatchedEvent, ) -> Pin<Box<dyn Future<Output = Result<(), DomainError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn publish_task_completed<'life0, 'life1, 'async_trait>( &'life0 self, event: &'life1 TaskCompletedEvent, ) -> Pin<Box<dyn Future<Output = Result<(), DomainError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn publish_task_failed<'life0, 'life1, 'async_trait>( &'life0 self, event: &'life1 TaskFailedEvent, ) -> Pin<Box<dyn Future<Output = Result<(), DomainError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn publish_deliberation_completed<'life0, 'life1, 'async_trait>( &'life0 self, event: &'life1 DeliberationCompletedEvent, ) -> Pin<Box<dyn Future<Output = Result<(), DomainError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn publish_phase_changed<'life0, 'life1, 'async_trait>( &'life0 self, event: &'life1 PhaseChangedEvent, ) -> Pin<Box<dyn Future<Output = Result<(), DomainError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§