rsiot/components/cmp_mqtt_client/
error.rs

1use crate::executor::ComponentError;
2
3#[allow(missing_docs)]
4#[derive(Debug, thiserror::Error)]
5pub enum Error {
6    #[error("CmpOutput: {0}")]
7    CmpOutput(ComponentError),
8
9    #[error("RumqttcClient: {0}")]
10    RumqttcClient(#[from] rumqttc::ClientError),
11
12    #[error("TokioTaskJoin: {0}")]
13    TokioTaskJoin(#[from] tokio::task::JoinError),
14}
15
16impl From<Error> for ComponentError {
17    fn from(value: Error) -> Self {
18        ComponentError::Execution(value.to_string())
19    }
20}