pub trait HasStateMachine<G>{
// 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§
Sourcefn lock<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = MutexGuard<'_, ()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
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.
Sourcefn state_machine<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StateMachine<G>> + 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,
The state machine data structure.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".