1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//! Пример "пустого" компонента. Для тестирования

use rsiot_messages_core::IMessage;

use crate::{Component, StreamInput, StreamOutput};

async fn process<TMessage>(
    _input: StreamInput<TMessage>,
    _output: StreamOutput<TMessage>,
    _config: Config,
) where
    TMessage: IMessage,
{
}

#[derive(Clone, Debug)]
pub struct Config {}

pub fn new<TMessage>() -> Box<Component<TMessage, Config>>
where
    TMessage: IMessage + 'static,
{
    Box::new(Component::new(Config {}, process))
}