rsiot/components/cmp_math/
config.rs

1use std::fmt::Debug;
2
3use crate::message::MsgDataBound;
4
5use super::Algs;
6
7/// Конфигурация компонента cmp_math
8pub struct Config<TMsg, TIntMsg>
9where
10    TMsg: MsgDataBound,
11    TIntMsg: IntMsgBound,
12{
13    /// # Пример
14    ///
15    /// ```rust
16    /// fn_input: |_| None
17    /// ```
18    pub fn_input: fn(TMsg) -> Option<TIntMsg>,
19
20    /// # Пример
21    ///
22    /// ```rust
23    /// fn_output: |_| vec![]
24    /// ```
25    pub fn_output: fn(TIntMsg) -> Option<Vec<TMsg>>,
26
27    /// Алгоритмы математической обработки
28    pub algs: Vec<Algs<TIntMsg>>,
29}
30
31/// Типаж для внутренних сообщений
32pub trait IntMsgBound: Clone + Copy + Debug + Send + Sync {}