rsiot/components/cmp_raspberrypi_gpio/
error.rs1use crate::executor::ComponentError;
2
3#[derive(Debug, thiserror::Error)]
5pub enum Error {
6 #[error("CmpOutput: {0}")]
8 CmpOutput(crate::executor::ComponentError),
9
10 #[error("RppalGpio: {0}")]
12 RppalGpio(#[from] rppal::gpio::Error),
13
14 #[error("TokioTaskJoin: {0}")]
16 TokioTaskJoin(#[from] tokio::task::JoinError),
17}
18
19impl From<Error> for ComponentError {
20 fn from(value: Error) -> Self {
21 ComponentError::Execution(value.to_string())
22 }
23}