/// The subunit for the state machine.
pubtraitState{/// Runs code for this current state and updates necessary substates for use
// in the `next` function.
fnrun(&mutself);/// Uses this state's current substates to determine the next state to
/// traverse to, or returns itself.
fnnext(self: Box<Self>)->Option<Box<dyn State>>;}