Trait fmodel_rust::decider::StateComputation
source · pub trait StateComputation<C, S, E> {
// Required method
fn compute_new_state(&self, current_state: Option<S>, command: &C) -> S;
}
Expand description
Formalizes the State Computation
algorithm / state-stored system for the decider
to handle commands based on the current state, and produce new state.
Required Methods§
sourcefn compute_new_state(&self, current_state: Option<S>, command: &C) -> S
fn compute_new_state(&self, current_state: Option<S>, command: &C) -> S
Computes new state based on the current state and the command.