Trait sfsm_base::__protected::IsState[][src]

pub trait IsState<State>: StateMachine {
    fn is_state(&self) -> bool;
}
Expand description

An implementation of this trait will be generated for every state. This is can be used to test if the state machine is in a desired state.

Required methods

The method must be called with the turbo fish syntax as otherwise Rust cannot figure out which implementation to call. To check if the state machine is in a given state call:

let is_in_state: bool = IsState::<State>::is_state(&sfsm);

Implementors