pub trait State { type Output; fn update(this: &mut Self) -> Option<Self::Output>; }
State trait
Returns output if state is updated