pub trait StateMachine<K>: Send + Syncwhere
K: Rex,{
// Required methods
fn process(&self, ctx: SmContext<K>, input: K::Input);
fn get_kind(&self) -> K;
// Provided methods
fn new_child(&self, ctx: &SmContext<K>, child_id: StateId<K>) { ... }
fn update(&self, ctx: &SmContext<K>, state: K::State) { ... }
}Expand description
Represents the trait that a state machine must fulfill to process signals
A StateMachine consumes the input portion of a Signal and…
- optionally emits
Signals - consumed by theStateMachineManagersignal_queue - optionally emits
Notifications - consumed by theNotificationQueue