1use thiserror::Error;
2
3#[derive(Debug, Error)]
5pub enum Error {
6 #[error("url not found")]
8 UrlNotFound,
9 #[error("capture groups not found")]
11 CapturesNotFound,
12 #[error("owner not found in capture group")]
14 OwnerNotFound,
15 #[error("repo not found in capture group")]
17 RepoNotFound,
18 #[error("no rust package found in repository")]
20 NoPackageFound,
21 #[error("Git2 says: {0}")]
23 Git2Error(#[from] git2::Error),
24 #[error("io error: {0}")]
26 IOError(#[from] std::io::Error),
27 #[error("toml serializer error: {0}")]
29 TomlSerError(#[from] toml::ser::Error),
30 #[error("toml deserializer error: {0}")]
32 TomlDeError(#[from] toml::de::Error),
33 }