Module state

Module state 

Source
Expand description

This module implements the State pattern.

![state diagram][state-diagram]

Modules§

prelude
Exposes the Context and State types at the library level.
simple
Implements a basic wrapper Context which contains a generic State object.

Traits§

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