Struct rust_fsm::StateMachine
source · pub struct StateMachine<T: StateMachineImpl> { /* private fields */ }
Expand description
A convenience wrapper around the StateMachine
trait that encapsulates the
state and transition and output function calls.
Implementations§
source§impl<T> StateMachine<T>where
T: StateMachineImpl,
impl<T> StateMachine<T>where
T: StateMachineImpl,
sourcepub fn new() -> Self
pub fn new() -> Self
Create a new instance of this wrapper which encapsulates the initial state.
sourcepub fn from_state(state: T::State) -> Self
pub fn from_state(state: T::State) -> Self
Create a new instance of this wrapper which encapsulates the given state.