Rex

Trait Rex 

Source
pub trait Rex: Kind + HashKind
where Self::State: AsRef<Self>,
{ type Message: RexMessage; // Required methods fn state_input(&self, state: Self::State) -> Option<Self::Input>; fn timeout_input(&self, instant: Instant) -> Option<Self::Input>; }
Expand description

Titular trait of the library that enables Hierarchical State Machine (HSM for short) behaviour. Makes sending Signals (destined to become a StateMachine’s input) and Notifications (a NotificationProcessor’s input) possible.

The Rex trait defines the scope of interaction that exists between one or more StateMachines and zero or more NotificationProcessors. Below is a diagram displaying the associated type hierarchy defined by validly implementing the Kind and Rex traits, double colons:: directed down and right represent type associations:


Kind -> Rex::Message
  ::              ::
  State::Input    Topic

Required Associated Types§

Required Methods§

Source

fn state_input(&self, state: Self::State) -> Option<Self::Input>

Source

fn timeout_input(&self, instant: Instant) -> Option<Self::Input>

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§