Struct finny::decl::FsmBuilder
source · [−]pub struct FsmBuilder<TFsm, TContext> {
pub _fsm: PhantomData<TFsm>,
pub _context: PhantomData<TContext>,
}
Expand description
The main builder-API for defining your Finny state machine.
Fields
_fsm: PhantomData<TFsm>
_context: PhantomData<TContext>
Implementations
Sets the initial state of the state machine. Required!
Defines multiple initial states for multiple regions of the FSM. The type has to be a tuple of the initial states for each region.
Example : fsm.initial_states<(StateA, StateX)>()
Require the Debug
trait on the Events.
Adds some information about a state.
pub fn sub_machine<TSubFsm>(
&mut self
) -> FsmSubMachineBuilder<TFsm, TContext, TSubFsm> where
TSubFsm: FsmBackend,
pub fn sub_machine<TSubFsm>(
&mut self
) -> FsmSubMachineBuilder<TFsm, TContext, TSubFsm> where
TSubFsm: FsmBackend,
Adds a sub machine
Trait Implementations
Returns the “default value” for a type. Read more