1use thiserror::Error;
2
3#[derive(Debug, Error)]
5pub enum Error {
6 #[error("Invalid paging mode option")]
8 InvalidPagingMode,
9 #[error("Configuration directory not set")]
11 DirectoryUnset,
12 #[error("Expansion of home directory in `{0}` failed")]
14 HomeExpansionFailed(String),
15 #[error("No rule selector specified (i.e. --id or --label)")]
17 NoRuleSelector,
18 #[error("No rule for label {0}")]
20 NoRuleFoundForLabel(String),
21 #[error("No rule for id {0}")]
23 RuleNotFound(usize),
24 #[error("Label `{0}` not found in the rule set")]
26 LabelNotFoundInRules(String),
27 #[error("Directory creation failed for `{0:?}`")]
29 DirectoryCreationFailed((String, Box<std::io::Error>)),
30 #[error(transparent)]
32 GoogleGmail1(#[from] Box<google_gmail1::Error>),
33 #[error(transparent)]
35 StdIO(#[from] std::io::Error),
36 #[error(transparent)]
38 TomlDe(#[from] toml::de::Error),
39}