pub trait UseStateMachine<G>: HasStateMachine<G>{
// Provided methods
fn source<'life0, 'async_trait, S>(
&'life0 self,
tag: G,
) -> Pin<Box<dyn Future<Output = Source<S>> + Send + 'async_trait>>
where S: 'static + Clone + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn source_value<'life0, 'async_trait, S>(
&'life0 self,
tag: G,
) -> Pin<Box<dyn Future<Output = Option<S>> + Send + 'async_trait>>
where S: 'static + Clone + PartialEq + Send + Sync + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn handle<'life0, 'async_trait, T>(
&'life0 self,
tag: G,
) -> Pin<Box<dyn Future<Output = Handle<T>> + Send + 'async_trait>>
where T: 'static + Clone + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn handle_value<'life0, 'async_trait, T>(
&'life0 self,
tag: G,
) -> Pin<Box<dyn Future<Output = Option<T>> + Send + 'async_trait>>
where T: 'static + Clone + PartialEq + Send + Sync + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
}Expand description
Some convenient methods to use state machine. The trait is auto implemented for types implemented HasStateMachine.
Provided Methods§
Sourcefn source<'life0, 'async_trait, S>(
&'life0 self,
tag: G,
) -> Pin<Box<dyn Future<Output = Source<S>> + Send + 'async_trait>>
fn source<'life0, 'async_trait, S>( &'life0 self, tag: G, ) -> Pin<Box<dyn Future<Output = Source<S>> + Send + 'async_trait>>
Get state source.
Sourcefn source_value<'life0, 'async_trait, S>(
&'life0 self,
tag: G,
) -> Pin<Box<dyn Future<Output = Option<S>> + Send + 'async_trait>>
fn source_value<'life0, 'async_trait, S>( &'life0 self, tag: G, ) -> Pin<Box<dyn Future<Output = Option<S>> + Send + 'async_trait>>
Get current value of state source.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".