[][src]Trait sm::Transition

pub trait Transition<E: Event>: Debug {
    type Machine: Machine;
    fn transition(self, event: E) -> Self::Machine;
}

Transition provides the method required to transition from one state to another.

If you are using the sm! macro, then there is no need to interact with this trait.

Associated Types

type Machine: Machine

Machine represents the machine on which the implemented transformation should execute.

Loading content...

Required methods

fn transition(self, event: E) -> Self::Machine

transition consumes the state machine and returns a new machine in the correct state, based on the passed in event.

Loading content...

Implementors

Loading content...