1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#[derive(Debug, thiserror::Error)]
pub enum Error {
    #[error(transparent)]
    DBus(dbus::Error),
    #[error("Unsupported method")]
    UnsupportedMethod,
    #[error("Unsupported device")]
    UnsupportedDevice,
    #[error("Unsupported type")]
    UnsupportedType,
}

impl From<dbus::Error> for Error {
    fn from(error: dbus::Error) -> Self {
        Error::DBus(error)
    }
}