Struct prometheus_http_query::error::PrometheusError
source · pub struct PrometheusError { /* 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 PrometheusError
impl PrometheusError
sourcepub fn error_type(&self) -> PrometheusErrorType
pub fn error_type(&self) -> PrometheusErrorType
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 Clone for PrometheusError
impl Clone for PrometheusError
source§fn clone(&self) -> PrometheusError
fn clone(&self) -> PrometheusError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for PrometheusError
impl Debug for PrometheusError
source§impl<'de> Deserialize<'de> for PrometheusError
impl<'de> Deserialize<'de> for PrometheusError
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 Display for PrometheusError
impl Display for PrometheusError
source§impl Error for PrometheusError
impl Error for PrometheusError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl PartialEq for PrometheusError
impl PartialEq for PrometheusError
source§fn eq(&self, other: &PrometheusError) -> bool
fn eq(&self, other: &PrometheusError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for PrometheusError
Auto Trait Implementations§
impl Freeze for PrometheusError
impl RefUnwindSafe for PrometheusError
impl Send for PrometheusError
impl Sync for PrometheusError
impl Unpin for PrometheusError
impl UnwindSafe for PrometheusError
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