Struct finny::FsmFrontend
source · [−]pub struct FsmFrontend<F, Q, I, T> where
F: FsmBackend,
Q: FsmEventQueue<F>,
I: Inspect,
T: FsmTimers<F>, {
pub backend: FsmBackendImpl<F>,
pub queue: Q,
pub inspect: I,
pub timers: T,
}
Expand description
The frontend of a state machine which also includes environmental services like queues and inspection. The usual way to use the FSM.
Fields
backend: FsmBackendImpl<F>
queue: Q
inspect: I
timers: T
Implementations
impl<F, Q, I, T> FsmFrontend<F, Q, I, T> where
F: FsmBackend,
Q: FsmEventQueue<F>,
I: Inspect,
T: FsmTimers<F>,
impl<F, Q, I, T> FsmFrontend<F, Q, I, T> where
F: FsmBackend,
Q: FsmEventQueue<F>,
I: Inspect,
T: FsmTimers<F>,
Start the FSM, initiates the transition to the initial state.
Dispatch any pending timer events into the queue, then run all the events from the queue until completition.
Dispatch this event and run it to completition.
pub fn dispatch_single_event(
&mut self,
event: FsmEvent<<F as FsmBackend>::Events, <F as FsmBackend>::Timers>
) -> FsmResult<()>
pub fn dispatch_single_event(
&mut self,
event: FsmEvent<<F as FsmBackend>::Events, <F as FsmBackend>::Timers>
) -> FsmResult<()>
Dispatch only this event, do not run it to completition.
Dispatch the entire event queue and run it to completition.
Methods from Deref<Target = FsmBackendImpl<F>>
pub fn get_current_states(
&self
) -> <<F as FsmBackend>::States as FsmStates<F>>::CurrentState
Trait Implementations
impl<F, Q, I, T> Deref for FsmFrontend<F, Q, I, T> where
F: FsmBackend,
Q: FsmEventQueue<F>,
I: Inspect,
T: FsmTimers<F>,
impl<F, Q, I, T> Deref for FsmFrontend<F, Q, I, T> where
F: FsmBackend,
Q: FsmEventQueue<F>,
I: Inspect,
T: FsmTimers<F>,
type Target = FsmBackendImpl<F>
type Target = FsmBackendImpl<F>
The resulting type after dereferencing.