Struct prometheus_http_query::error::ApiError
source · pub struct ApiError { /* private fields */ }
Expand description
This error is thrown when the JSON response’s status
field contains error
.
The error-related information from the JSON body is included in this error.
Implementations§
source§impl ApiError
impl ApiError
sourcepub fn error_type(&self) -> ApiErrorType
pub fn error_type(&self) -> ApiErrorType
Returns the parsed version of the error type that was given by the Prometheus API.
pub fn is_timeout(&self) -> bool
pub fn is_canceled(&self) -> bool
pub fn is_execution(&self) -> bool
pub fn is_bad_data(&self) -> bool
pub fn is_internal(&self) -> bool
pub fn is_not_found(&self) -> bool
Trait Implementations§
source§impl<'de> Deserialize<'de> for ApiError
impl<'de> Deserialize<'de> for ApiError
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more