rsiot/components/cmp_raspberrypi_i2c_master/
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("FnOutput: {0}")]
10    FnOutput(anyhow::Error),
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}