github_email/errors/
mod.rs

1use std::{
2    error::Error,
3    fmt::{Debug, Display, Formatter},
4};
5
6#[cfg(feature = "octocrab")]
7mod for_octocrab;
8mod for_reqwest;
9mod for_serde_json;
10
11#[derive(Debug, Clone)]
12pub enum GithubError {
13    NetworkError(String),
14    RuntimeError(String),
15    UnknownError,
16}
17
18impl Display for GithubError {
19    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
20        Debug::fmt(self, f)
21    }
22}
23
24impl Error for GithubError {}
25
26pub type Result<T = ()> = std::result::Result<T, GithubError>;