prometheus_http_client/
error.rs1use displaydoc::Display;
4use url::ParseError;
5
6#[derive(Debug, Display)]
8pub enum Error {
9 Url(ParseError),
11 Reqwest(reqwest::Error),
13 API(String, String),
15 UnexpectedResultType(String),
17 MissingData,
19}
20
21impl From<reqwest::Error> for Error {
22 fn from(src: reqwest::Error) -> Self {
23 Self::Reqwest(src)
24 }
25}
26
27impl From<ParseError> for Error {
28 fn from(src: ParseError) -> Self {
29 Self::Url(src)
30 }
31}
32
33impl std::error::Error for Error {}