Trait finny::FsmBackend
source · [−]pub trait FsmBackend where
Self: Sized + Debug, {
type Context;
type States: FsmStates<Self>;
type Events: AsRef<str> + Clone;
type Timers: Debug + Clone + PartialEq + AllVariants;
fn dispatch_event<Q, I, T>(
ctx: DispatchContext<'_, '_, '_, Self, Q, I, T>,
event: FsmEvent<Self::Events, Self::Timers>
) -> FsmDispatchResult
where
Q: FsmEventQueue<Self>,
I: Inspect,
T: FsmTimers<Self>;
}
Expand description
Finite State Machine backend. Handles the dispatching, the types are defined by the code generator.
Associated Types
A tagged union type with all the supported events. This type has to support cloning to facilitate the dispatch into sub-machines and into multiple regions.