Trait ActionComputation

Source
pub trait ActionComputation<AR, A> {
    // Required method
    fn compute_new_actions(&self, event: &AR) -> Vec<A>;
}
Expand description

Formalizes the Action Computation algorithm for the saga to handle events/action_results, and produce new commands/actions.

Required Methods§

Source

fn compute_new_actions(&self, event: &AR) -> Vec<A>

Computes new commands/actions based on the event/action_result.

Implementors§

Source§

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

Source§

impl<AR, A> ActionComputation<AR, A> for Saga<'_, AR, A>