pub fn new<S: State<T> + 'a>(initial_state: S) -> StateMachine<'a, T> {
        StateMachine {
            running: false,
            state_stack: vec![Box::new(initial_state)],
        }
    }
/// Creates a new state machine with the given initial state.
Creates a new state machine with the given initial state.
Creates a new state machine with the given initial state .
pub fn new<S: State<T> + 'a>(initial_state: S) -> StateMachine<'a, T> {
        StateMachine {
            running: false,
            state_stack: vec![Box::new(initial_state)],
        }
    }
pub fn new < S : State < T > + ' a > ( initial_state : S ) -> StateMachine < ' a , T > { StateMachine { running : false , state_stack : vec ! [ Box new ( initial_state ) ] , } }
Creates a new state machine with the given initial state.
Creates a new state machine with the given initial state .
initial_state
S
initial_state
S