Trait statig::Superstate
source · pub trait Superstate<M>where
M: StateMachine,{
fn call_handler(
&mut self,
context: &mut <M as StateMachine>::Context,
event: &<M as StateMachine>::Event
) -> Response<<M as StateMachine>::State>;
fn call_entry_action(&mut self, _object: &mut <M as StateMachine>::Context) { ... }
fn call_exit_action(&mut self, _object: &mut <M as StateMachine>::Context) { ... }
fn superstate(&mut self) -> Option<<M as StateMachine>::Superstate<'_>>
where
Self: Sized,
{ ... }
}Expand description
An enum that represents the superstates of the state machine.
Required Methods
sourcefn call_handler(
&mut self,
context: &mut <M as StateMachine>::Context,
event: &<M as StateMachine>::Event
) -> Response<<M as StateMachine>::State>
fn call_handler(
&mut self,
context: &mut <M as StateMachine>::Context,
event: &<M as StateMachine>::Event
) -> Response<<M as StateMachine>::State>
Call the handler for the current superstate.
Provided Methods
sourcefn call_entry_action(&mut self, _object: &mut <M as StateMachine>::Context)
fn call_entry_action(&mut self, _object: &mut <M as StateMachine>::Context)
Call the entry action for the current superstate.
sourcefn call_exit_action(&mut self, _object: &mut <M as StateMachine>::Context)
fn call_exit_action(&mut self, _object: &mut <M as StateMachine>::Context)
Call the exit action for the current superstate.
sourcefn superstate(&mut self) -> Option<<M as StateMachine>::Superstate<'_>>where
Self: Sized,
fn superstate(&mut self) -> Option<<M as StateMachine>::Superstate<'_>>where
Self: Sized,
Return the superstate of the current superstate, if there is one.
Implementations on Foreign Types
sourceimpl<M> Superstate<M> for ()where
M: StateMachine,
impl<M> Superstate<M> for ()where
M: StateMachine,
When no superstates are required, the user can pass the () type.