1use thiserror::Error;
4
5pub type Result<T> = std::result::Result<T, Error>;
7
8#[derive(Debug, Error)]
10pub enum Error {
11 #[error("I/O error: {0}")]
12 Io(#[from] std::io::Error),
13
14 #[error("TOML parse error: {0}")]
15 Toml(#[from] toml::de::Error),
16
17 #[error("Glob pattern error: {0}")]
18 Glob(#[from] glob::PatternError),
19
20 #[error("UTF-8 error: {0}")]
21 Utf8(#[from] std::string::FromUtf8Error),
22
23 #[error("zvariant error: {0}")]
24 Zvariant(#[from] zvariant::Error),
25
26 #[error("D-Bus protocol error: {0}")]
27 Protocol(String),
28
29 #[error("Authentication error: {0}")]
30 Auth(String),
31}