pub trait EventComputation<C, S, E> {
    // Required method
    fn compute_new_events(&self, current_events: &[E], command: &C) -> Vec<E>;
}
Expand description

Formalizes the Event Computation algorithm / event sourced system for the decider to handle commands based on the current events, and produce new events.

Required Methods§

source

fn compute_new_events(&self, current_events: &[E], command: &C) -> Vec<E>

Computes new events based on the current events and the command.

Implementors§

source§

impl<'a, C, S, E> EventComputation<C, S, E> for Decider<'a, C, S, E>