Skip to main content

HasStateMachine

Trait HasStateMachine 

Source
pub trait HasStateMachine<G>
where G: Clone + Debug + Eq + Hash,
{ // Required methods fn lock<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = MutexGuard<'_, ()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn state_machine<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = StateMachine<G>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; }
Expand description

At least you should provide a state machine data structure.

Required Methods§

Source

fn lock<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = MutexGuard<'_, ()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The mutex lock to use.

Source

fn state_machine<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = StateMachine<G>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The state machine data structure.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§