Skip to main content

State

Trait State 

Source
pub trait State<M: State<M>> {
    type Error: Debug;

    // Required method
    fn next(self) -> Result<Option<M>, Self::Error>;
}
Expand description

Represents state of a state machine M

Required Associated Types§

Required Methods§

Source

fn next(self) -> Result<Option<M>, Self::Error>

Runs the current step and returns the next machine state or None if everything is done

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§