Trait rust_fsm::StateMachineImpl
source · pub trait StateMachineImpl {
type Input;
type State;
type Output;
const INITIAL_STATE: Self::State;
// Required methods
fn transition(
state: &Self::State,
input: &Self::Input
) -> Option<Self::State>;
fn output(state: &Self::State, input: &Self::Input) -> Option<Self::Output>;
}Expand description
This trait is designed to describe any possible deterministic finite state machine/transducer. This is just a formal definition that may be inconvenient to be used in practical programming, but it is used throughout this library for more practical things.
Required Associated Types§
Required Associated Constants§
sourceconst INITIAL_STATE: Self::State
const INITIAL_STATE: Self::State
The initial state of the machine.
Required Methods§
Object Safety§
This trait is not object safe.