Trait rsiot_component_core::IComponent
source · pub trait IComponent<TMessage> {
// Required methods
fn set_input(&mut self, input: Input<TMessage>);
fn set_output(&mut self, output: Output<TMessage>);
fn spawn(&mut self) -> JoinHandle<()>;
// Provided method
fn set_and_spawn(
&mut self,
input: Input<TMessage>,
output: Output<TMessage>
) -> JoinHandle<()> { ... }
}
Expand description
Трейт для работы с компонентом из построителя цепочки компонентов ComponentChainBuilder
Required Methods§
sourcefn set_output(&mut self, output: Output<TMessage>)
fn set_output(&mut self, output: Output<TMessage>)
Задать выходной поток
sourcefn spawn(&mut self) -> JoinHandle<()>
fn spawn(&mut self) -> JoinHandle<()>
Порождаем асинхронную задачу
Provided Methods§
sourcefn set_and_spawn(
&mut self,
input: Input<TMessage>,
output: Output<TMessage>
) -> JoinHandle<()>
fn set_and_spawn( &mut self, input: Input<TMessage>, output: Output<TMessage> ) -> JoinHandle<()>
Задать входной и выходной потоки и запустить на выполнение