Skip to main content

Machine

Trait Machine 

Source
pub trait Machine<E> {
    type State;
    type Error;

    // Required method
    fn process(&mut self, event: E) -> Result<&Self::State, Self::Error>;
}
Expand description

Common synchronous interface implemented by generated state machines that do not require a temporary context.

Required Associated Types§

Source

type State

Generated state enum.

Source

type Error

Generated processing error.

Required Methods§

Source

fn process(&mut self, event: E) -> Result<&Self::State, Self::Error>

Processes one event.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§