ebyte_e32/
error.rs

1use snafu::prelude::*;
2
3#[derive(Debug, Snafu)]
4pub enum Error {
5    /// Failed to read model data.
6    #[snafu(display("Failed to read model data"))]
7    ReadModelData,
8
9    /// Failed to read parameters.
10    #[snafu(display("Failed to read parameters"))]
11    ReadParameters,
12
13    /// Failed to set parameters.
14    #[snafu(display("Failed to set parameters"))]
15    SetParameters,
16
17    /// Failed to read serial port.
18    #[snafu(display("Failed to read serial port"))]
19    SerialRead,
20
21    /// Failed to write serial port.
22    #[snafu(display("Failed to write serial port"))]
23    SerialWrite,
24
25    /// Failed to wait for AUX pin.
26    #[snafu(display("Failed to wait for AUX pin"))]
27    AuxPin,
28
29    /// Failed to process parameters.
30    #[snafu(display("Parameter error {source}"))]
31    Parameter { source: crate::parameters::Error },
32}