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
source§impl PartialEq for ApiError
impl PartialEq for ApiError
impl StructuralPartialEq for ApiError
Auto Trait Implementations§
impl RefUnwindSafe for ApiError
impl Send for ApiError
impl Sync for ApiError
impl Unpin for ApiError
impl UnwindSafe for ApiError
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more