Skip to main content

UseStateSource

Trait UseStateSource 

Source
pub trait UseStateSource<Tag>: HasStateMachine<Tag>
where Tag: 'static + Clone + Debug + Eq + Hash + Send + Sync,
{ // Provided method fn add_source<'life0, 'async_trait, S>( &'life0 self, tag: Tag, source: Source<S>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where S: 'static + Send + Sync + 'async_trait, Self: Sync + 'async_trait, 'life0: 'async_trait { ... } }
Expand description

Convenient method to add state source to state machine. The trait is auto implemented for types implemented HasStateMachine.

Provided Methods§

Source

fn add_source<'life0, 'async_trait, S>( &'life0 self, tag: Tag, source: Source<S>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where S: 'static + Send + Sync + 'async_trait, Self: Sync + 'async_trait, 'life0: 'async_trait,

Add state source to state machine.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<T, Tag> UseStateSource<Tag> for T
where T: HasStateMachine<Tag>, Tag: 'static + Clone + Debug + Eq + Hash + Send + Sync,