jinxapi_github/v1_1_4/
mod.rs1
2use thiserror::Error;
11
12mod support;
13
14pub mod config;
15pub mod request;
16pub mod schema;
17
18#[cfg(feature = "hyper")]
19pub mod hyper;
20
21#[cfg(feature = "reqwest")]
22pub mod reqwest;
23
24#[derive(Error, Debug)]
25pub enum ApiError {
26 #[cfg(feature = "hyper")]
27 #[error("Hyper error")]
28 Hyper {
29 #[from]
30 source: ::hyper::Error,
31 },
32
33 #[cfg(feature = "reqwest")]
34 #[error("Reqwest error")]
35 Reqwest {
36 #[from]
37 source: ::reqwest::Error,
38 },
39
40 #[cfg(feature = "reqwest")]
41 #[error("URL parse error")]
42 UrlParser {
43 #[from]
44 source: ::url::ParseError,
45 },
46
47 #[error("AuthenticError")]
48 Authentic {
49 #[from]
50 source: ::authentic::AuthenticError,
51 },
52
53 #[error("QuerylizerError")]
54 Querylizer {
55 #[from]
56 source: ::querylizer::QuerylizerError,
57 },
58
59 #[error("InvalidHeaderValue")]
60 InvalidHeaderValue {
61 #[from]
62 source: ::hyper::header::InvalidHeaderValue,
63 },
64 #[error("HttpError")]
65 Http {
66 #[from]
67 source: ::http::Error,
68 },
69 #[error("JsonSerializationError")]
70 JsonSerializationError {
71 #[from]
72 source: ::serde_json::error::Error,
73 },
74 #[error("FormatError")]
75 Format {
76 #[from]
77 source: ::std::fmt::Error,
78 },
79 #[error("{0}")]
80 Other(String),
81}