Context

Trait Context 

Source
pub trait Context<S>
where S: State,
{ // Required method fn handle(&mut self); }
Expand description

This trait holds the active state, and acts as a persistent handle for the state machine, which could otherwise be the states themselves.

Required Methods§

Source

fn handle(&mut self)

Delegates the state transition to the currently active state held by the context, probably triggering a state change by the context.

Implementors§

Source§

impl<S> Context<S> for SimpleContext<S>
where S: State,