Struct rust_fsm::StateMachine[][src]

pub struct StateMachine<T: StateMachineImpl> { /* fields omitted */ }
Expand description

A convenience wrapper around the StateMachine trait that encapsulates the state and transition and output function calls.

Implementations

Create a new instance of this wrapper which encapsulates the initial state.

Create a new instance of this wrapper which encapsulates the given state.

Consumes the provided input, gives an output and performs a state transition. If a state transition with the current state and the provided input is not allowed, returns an error.

Returns the current state.

Trait Implementations

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.