rsiot/components/cmp_slint/
error.rs

1use crate::{components::shared_tasks, executor::ComponentError};
2
3/// Errors of cmp_slint
4#[allow(missing_docs)]
5#[derive(Debug, thiserror::Error)]
6pub enum Error {
7    #[error(transparent)]
8    SlintEventLoopError(#[from] slint::EventLoopError),
9
10    #[error(transparent)]
11    TaskFilterSendPeriodically(shared_tasks::filter_send_periodically::Error),
12
13    #[error("TaskInput")]
14    TaskInput,
15
16    #[error(transparent)]
17    TaskMpscToMsgBus(shared_tasks::mpsc_to_msgbus::Error),
18
19    #[error(transparent)]
20    TaskMsgBusToMpsc(shared_tasks::msgbus_to_mpsc::Error),
21
22    #[error("TaskOutput")]
23    TaskOutput,
24
25    #[error(transparent)]
26    TokioJoin(#[from] tokio::task::JoinError),
27
28    #[error("TokioSyncMpsc")]
29    TokioSyncMpsc,
30}
31
32impl From<Error> for ComponentError {
33    fn from(value: Error) -> Self {
34        ComponentError::Execution(value.to_string())
35    }
36}