headhunter_bindings/
error.rs

1/// Custom Result type with two generic parameters for user convenience
2pub type Result<T, E = Error> = std::result::Result<T, E>;
3
4/// Describes possible errors that might happen while using this library
5#[derive(thiserror::Error, Debug)]
6pub enum Error {
7    #[error("Serde json error: {0}")]
8    Serde(#[from] serde_json::Error),
9    #[error("Selenium error: {0}")]
10    Selenium(#[from] thirtyfour::error::WebDriverError),
11    #[error("Request error: {0}")]
12    Request(#[from] reqwest::Error),
13    #[error("URL parse error: {0}")]
14    UrlParse(#[from] url::ParseError),
15    #[error("URL serialization error: {0}")]
16    UrlSerialize(#[from] serde_urlencoded::ser::Error),
17    #[error("Headhunter API error: {0}")]
18    Headhunter(serde_json::Value),
19    #[error("URL build error")]
20    UrlBuild,
21}