StateMachine

Trait StateMachine 

Source
pub trait StateMachine<K>: Send + Sync
where 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…

Required Methods§

Source

fn process(&self, ctx: SmContext<K>, input: K::Input)

Source

fn get_kind(&self) -> K

Provided Methods§

Source

fn new_child(&self, ctx: &SmContext<K>, child_id: StateId<K>)

Source

fn update(&self, ctx: &SmContext<K>, state: K::State)

Panic: will panic if passed in an id without a previously stored state

Implementors§