[−][src]Trait sm::Initializer
Initializer defines the new
method on a machine, that accepts any state
marked as InitialState
, and returns a new machine.
If you are using the sm!
macro, then there is no need to interact with
this trait.
Associated Types
type Machine: Machine<State = S, Event = NoneEvent>
Machine represents the machine which the implemented initialiser should return.
Required Methods
fn new(state: S) -> Self::Machine
new initialises a new machine, based on the provided InitialState
as
input.