pub trait ViewStateComputation<E, S> {
    // Required method
    fn compute_new_state(&self, current_state: Option<S>, events: &[&E]) -> S;
}

Required Methods§

source

fn compute_new_state(&self, current_state: Option<S>, events: &[&E]) -> S

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

Implementors§

source§

impl<'a, S, E> ViewStateComputation<E, S> for View<'a, S, E>