pub trait State<Engine> {
fn toggle(engine: &mut Engine, inner: Option<&Self>) -> bool;
fn load(engine: &mut Engine) -> Self;
fn run(&mut self, engine: &mut Engine);
fn drop(&mut self, engine: &mut Engine);
}Required Methods
This determines whether or not to run this local state machine.
This creates and imports new initial state on this local state machine when the toggle’s on.
This executes custom logics and manipulates this local state machine’s states.