Trait fxsm::StateMachine
[−]
[src]
pub trait StateMachine<S> { fn change(&mut self, new_state: S) -> bool; fn can_change(&self, new_state: S) -> bool; fn is_finish_state(state: S) -> bool; fn at_finish_state(&self) -> bool; fn finish_states() -> usize; }
Required Methods
fn change(&mut self, new_state: S) -> bool
Returns true if it changed state successfully; false otherwise.
fn can_change(&self, new_state: S) -> bool
Returns true if it is possible to change state to new_state
; false otherwise.
fn is_finish_state(state: S) -> bool
Returns true if it is a one of finish states.
fn at_finish_state(&self) -> bool
Returns true if the FSM is in a finish state.
fn finish_states() -> usize
Returns a number of total finish states.