Trait IComponent

Source
pub trait IComponent<TMsg> {
    // Required methods
    fn set_interface(&mut self, in_out: CmpInOut<TMsg>);
    fn spawn<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<(), ComponentError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn set_interface(&mut self, in_out: CmpInOut<TMsg>)

Source

fn spawn<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), ComponentError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§

Source§

impl<TConfig, TMsg> IComponent<TMsg> for Component<TConfig, TMsg>
where TMsg: Send + Sync, Self: IComponentProcess<TConfig, TMsg>, TConfig: Send,