Struct genfsm::StateMachine
[−]
[src]
pub struct StateMachine<S, I> { /* fields omitted */ }
The core of the GenFSM library. Holds the Executor and current state of a state machine, and handles the processing of NextState values from Executors.
Methods
impl<S, I> StateMachine<S, I>
[src]
fn process(&mut self, input_val: I)
Processes new input, using the current executor to update state.
fn is_complete(&self) -> bool
Returns true if there is no executor to handle additional input.
fn extract_state(self) -> S
Extracts the current state from the state machine.
fn new(exec: Executor<S, I>, state: S) -> StateMachine<S, I>
Creates a state machine starting with the given state. The executor given will be used to process input.
impl<S: Clone, I> StateMachine<S, I>
[src]
fn clone_state(&self) -> S
Returns a clone of the current state