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