pub trait IComponentProcess<TConfig, TMsg, TService>where
TMsg: MsgDataBound,
TService: ServiceBound,{
// Required method
fn process<'life0, 'async_trait>(
&'life0 self,
config: TConfig,
in_out: CmpInOut<TMsg, TService>,
) -> Pin<Box<dyn Future<Output = CmpResult> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Трейт основной функции компонента
Каждый компонент должен определить данный трейт
Required Methods§
Implementors§
impl<TMsg, TFnPeriodic, TService> IComponentProcess<Config<TMsg, TFnPeriodic>, TMsg, TService> for Component<Config<TMsg, TFnPeriodic>, TMsg, TService>where
TMsg: MsgDataBound,
TFnPeriodic: FnMut() -> Vec<Message<TMsg>> + Send + Sync,
TService: ServiceBound,
impl<TMsg, TI2c, TPeripheral, TI2cRequest, TI2cResponse, TBufferData, TService> IComponentProcess<Config<TMsg, TI2c, TPeripheral, TI2cRequest, TI2cResponse, TBufferData>, TMsg, TService> for Component<Config<TMsg, TI2c, TPeripheral, TI2cRequest, TI2cResponse, TBufferData>, TMsg, TService>where
TMsg: MsgDataBound + 'static,
TI2c: Peripheral<P = TPeripheral> + 'static,
TPeripheral: I2c,
TI2cRequest: Debug + DeserializeOwned + 'static,
TI2cResponse: Debug + Serialize + 'static,
TBufferData: BufferData + 'static,
TService: ServiceBound + 'static,
impl<TMsg, TI2c, TPeripheral, TService> IComponentProcess<Config<TMsg, TI2c, TPeripheral>, TMsg, TService> for Component<Config<TMsg, TI2c, TPeripheral>, TMsg, TService>where
TMsg: MsgDataBound + 'static,
TI2c: Peripheral<P = TPeripheral> + 'static,
TPeripheral: I2c,
TService: ServiceBound + 'static,
impl<TMsg, TService> IComponentProcess<Config<TMsg>, TMsg, TService> for Component<Config<TMsg>, TMsg, TService>where
TMsg: MsgDataBound + 'static,
TService: ServiceBound,
Компонент для добавления сообщений из побочного потока