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

Returns true if it changed state successfully; false otherwise.

Returns true if it is possible to change state to new_state; false otherwise.

Returns true if it is a one of finish states.

Returns true if the FSM is in a finish state.

Returns a number of total finish states.

Implementors