pub trait ActionPublisher<A, Error> {
    // Required method
    fn publish<'life0, 'life1, 'async_trait>(
        &'life0 self,
        action: &'life1 [A]
    ) -> Pin<Box<dyn Future<Output = Result<Vec<A>, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Publishes the action/command to some external system.

Generic parameter:

  • A. - action
  • Error - error

Required Methods§

source

fn publish<'life0, 'life1, 'async_trait>( &'life0 self, action: &'life1 [A] ) -> Pin<Box<dyn Future<Output = Result<Vec<A>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Publishes the action/command to some external system, returning either the actions that are successfully published or error.

Implementors§

source§

impl<A, AR, Publisher, Saga, Error> ActionPublisher<A, Error> for SagaManager<A, AR, Publisher, Saga, Error>
where Publisher: ActionPublisher<A, Error> + Sync, Saga: ActionComputation<AR, A> + Sync, A: Sync, AR: Sync, Error: Sync,