State

Trait State 

Source
pub trait State {
    // Required method
    fn execute(&self) -> Self;
}
Expand description

Provides transitions between states.

Required Methods§

Source

fn execute(&self) -> Self

Allow the state to engage in whatever processing it would normally do. The returned State is used to determine the new state the Context should assume.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§