pub enum ProductMetricError {
NotInitialized,
DuplicateRegistration {
subsystem: &'static str,
name: &'static str,
},
UnknownMetric {
subsystem: &'static str,
name: &'static str,
},
WrongKind {
subsystem: &'static str,
name: &'static str,
actual: MetricKind,
expected: MetricKind,
},
LabelCountMismatch {
subsystem: &'static str,
name: &'static str,
expected: usize,
actual: usize,
},
Prometheus(String),
LockPoisoned,
}Expand description
Errors returned by product metric registration or recording.
Variants§
NotInitialized
The Prometheus registry has not been initialized.
DuplicateRegistration
A product metric with the same subsystem/name was already registered.
UnknownMetric
The handle does not point to a registered metric.
WrongKind
The recording operation does not match the registered metric kind.
LabelCountMismatch
The number of label values did not match the descriptor.
Fields
Prometheus(String)
Prometheus rejected the metric collector.
LockPoisoned
The product metric registry lock was poisoned.
Trait Implementations§
Source§impl Clone for ProductMetricError
impl Clone for ProductMetricError
Source§fn clone(&self) -> ProductMetricError
fn clone(&self) -> ProductMetricError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ProductMetricError
impl Debug for ProductMetricError
Source§impl Display for ProductMetricError
impl Display for ProductMetricError
Source§impl Error for ProductMetricError
impl Error for ProductMetricError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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 ProductMetricError
impl PartialEq for ProductMetricError
Source§fn eq(&self, other: &ProductMetricError) -> bool
fn eq(&self, other: &ProductMetricError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for ProductMetricError
impl StructuralPartialEq for ProductMetricError
Auto Trait Implementations§
impl Freeze for ProductMetricError
impl RefUnwindSafe for ProductMetricError
impl Send for ProductMetricError
impl Sync for ProductMetricError
impl Unpin for ProductMetricError
impl UnsafeUnpin for ProductMetricError
impl UnwindSafe for ProductMetricError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.