Trait statig::StateMachine

source ·
pub trait StateMachinewhere
    Self: Sized,
{ type Event; type State: State<Self>; type Superstate<'a>: Superstate<Self>
    where
        Self::State: 'a
; const INIT_STATE: Self::State; fn on_dispatch(
        &mut self,
        _state: StateOrSuperstate<'_, '_, Self>,
        _event: &Self::Event
    ) { ... } fn on_transition(&mut self, _source: &Self::State, _target: &Self::State) { ... } }
Expand description

A data structure that declares the types associated with the state machine.

Required Associated Types

Event that is processed by the state machine.

Enumeration of the various states.

Enumeration of the various superstates.

Required Associated Constants

Initial state of the state machine.

Provided Methods

Method that is called before an event is dispatched to a state or superstate handler.

Method that is called after every transition.

Implementors