pub trait StateMachineBuilder<State, Input, Transition>{
type Output;
// Required methods
fn start() -> Self;
fn initial_state(self, state: State) -> Self;
fn current_state(self, state: State) -> Self;
fn transition(self, next: Transition) -> Self;
fn build(self) -> Result<Self::Output, Box<dyn Error>>;
}Required Associated Types§
Required Methods§
Sourcefn initial_state(self, state: State) -> Self
fn initial_state(self, state: State) -> Self
Sets particular initial state to the state machine.
Sourcefn current_state(self, state: State) -> Self
fn current_state(self, state: State) -> Self
Sets particular state to the current state.
Sourcefn transition(self, next: Transition) -> Self
fn transition(self, next: Transition) -> Self
Sets particular transition algorithm to the state machine.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.