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

use rsiot_messages_core::IMessage;

use crate::{CacheType, Component, ComponentInput, ComponentOutput};

async fn fn_process<TMessage>(
    _input: ComponentInput<TMessage>,
    _output: ComponentOutput<TMessage>,
    _config: Config,
    _cache: CacheType<TMessage>,
) where
    TMessage: IMessage,
{
}

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

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