update

Function update 

Source
pub fn update(state: &mut State, cmd: Command, ctx: &Ctx) -> Vec<Event>
Expand description

Apply one Command to State, returning the resulting Events. State is mutated in place. Total function — never panics on input (panics are reserved for internal invariant violations).