Trait finny::FsmFactory
source · [−]pub trait FsmFactory {
type Fsm: FsmBackend;
fn new_submachine_backend(
backend: FsmBackendImpl<Self::Fsm>
) -> FsmResult<Self>
where
Self: Sized;
fn new_with<Q, I, T>(
context: <Self::Fsm as FsmBackend>::Context,
queue: Q,
inspect: I,
timers: T
) -> FsmResult<FsmFrontend<Self::Fsm, Q, I, T>>
where
Q: FsmEventQueue<Self::Fsm>,
I: Inspect,
T: FsmTimers<Self::Fsm>,
{ ... }
fn new(
context: <Self::Fsm as FsmBackend>::Context
) -> FsmResult<FsmFrontend<Self::Fsm, FsmEventQueueVec<Self::Fsm>, InspectNull, TimersStd<Self::Fsm>>> { ... }
}
Expand description
Builds a frontend for running your FSM.
Associated Types
type Fsm: FsmBackend
Required methods
fn new_submachine_backend(backend: FsmBackendImpl<Self::Fsm>) -> FsmResult<Self> where
Self: Sized,
fn new_submachine_backend(backend: FsmBackendImpl<Self::Fsm>) -> FsmResult<Self> where
Self: Sized,
For submachines, for use with codegen.
Provided methods
fn new_with<Q, I, T>(
context: <Self::Fsm as FsmBackend>::Context,
queue: Q,
inspect: I,
timers: T
) -> FsmResult<FsmFrontend<Self::Fsm, Q, I, T>> where
Q: FsmEventQueue<Self::Fsm>,
I: Inspect,
T: FsmTimers<Self::Fsm>,
fn new_with<Q, I, T>(
context: <Self::Fsm as FsmBackend>::Context,
queue: Q,
inspect: I,
timers: T
) -> FsmResult<FsmFrontend<Self::Fsm, Q, I, T>> where
Q: FsmEventQueue<Self::Fsm>,
I: Inspect,
T: FsmTimers<Self::Fsm>,
Build a new frontend for the FSM with all the environmental services provided by the caller.
fn new(
context: <Self::Fsm as FsmBackend>::Context
) -> FsmResult<FsmFrontend<Self::Fsm, FsmEventQueueVec<Self::Fsm>, InspectNull, TimersStd<Self::Fsm>>>
fn new(
context: <Self::Fsm as FsmBackend>::Context
) -> FsmResult<FsmFrontend<Self::Fsm, FsmEventQueueVec<Self::Fsm>, InspectNull, TimersStd<Self::Fsm>>>
Build a new frontend for the FSM with a FsmEventQueueVec
queue, TimersStd
for timers and no logging.