Drain

Trait Drain 

Source
pub trait Drain {
    type Item;

    // Required method
    fn drain_all(&mut self) -> impl Iterator<Item = Self::Item> + Send;
}
Expand description

The ability to extract output messages from a state machine.

This trait can be implement for Fsm::SE. A state machine driver that requires this will call drain_all after each step and forward the returned output messages.

Required Associated Types§

Source

type Item

Messages generated during a state machine step.

Required Methods§

Source

fn drain_all(&mut self) -> impl Iterator<Item = Self::Item> + Send

remove and return accumulated messages.

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§