pub enum MetricsError {
MetricNotFound(MetricId),
TypeMismatch {
expected: MetricType,
found: MetricType,
},
StorageError(String),
InvalidOperation(String),
}
Expand description
An error that can occur within the metrics system.
Variants§
MetricNotFound(MetricId)
The requested metric was not found in the registry.
TypeMismatch
An operation was attempted on a metric of the wrong type (e.g., trying to set a gauge value on a counter).
Fields
§
expected: MetricType
The expected metric type for the operation.
§
found: MetricType
The actual metric type that was found.
StorageError(String)
An error originating from the backend storage layer.
InvalidOperation(String)
An invalid operation was attempted (e.g., invalid histogram bounds).
Trait Implementations§
Source§impl Clone for MetricsError
impl Clone for MetricsError
Source§fn clone(&self) -> MetricsError
fn clone(&self) -> MetricsError
Returns a duplicate 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 MetricsError
impl Debug for MetricsError
Source§impl Display for MetricsError
impl Display for MetricsError
Source§impl Error for MetricsError
impl Error for MetricsError
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()
Auto Trait Implementations§
impl Freeze for MetricsError
impl RefUnwindSafe for MetricsError
impl Send for MetricsError
impl Sync for MetricsError
impl Unpin for MetricsError
impl UnwindSafe for MetricsError
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