Kind

Trait Kind 

Source
pub trait Kind:
    Debug
    + Send
    + Sized {
    type State: State<Input = Self::Input> + AsRef<Self>;
    type Input: Send + Sync + 'static + Debug;

    // Required methods
    fn new_state(&self) -> Self::State;
    fn failed_state(&self) -> Self::State;
    fn completed_state(&self) -> Self::State;

    // Provided method
    fn is_terminal(state: Self::State) -> bool { ... }
}
Expand description

Acts as a discriminant between various State enumerations, similar to std::mem::Discriminant. Used to define the scope for Signals cycled through a StateMachineManager.

Required Associated Types§

Source

type State: State<Input = Self::Input> + AsRef<Self>

Source

type Input: Send + Sync + 'static + Debug

Required Methods§

Source

fn new_state(&self) -> Self::State

Source

fn failed_state(&self) -> Self::State

Source

fn completed_state(&self) -> Self::State

Provided Methods§

Source

fn is_terminal(state: Self::State) -> bool

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§