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§
Sourcefn compute_new_events(&self, current_events: &[E], command: &C) -> Vec<E>
fn compute_new_events(&self, current_events: &[E], command: &C) -> Vec<E>
Computes new events based on the current events and the command.