pub enum MetricsError {
CircuitOpen,
Overloaded,
InvalidName,
InvalidValue {
reason: &'static str,
},
Overflow,
Underflow,
OverLimit,
WouldBlock,
NotInitialized,
Config(String),
}
Expand description
Metrics errors
Variants§
CircuitOpen
Circuit breaker is open and the operation is not allowed.
Overloaded
System is overloaded (e.g., adaptive sampler reduced acceptance) and rejected the operation.
InvalidName
Invalid metric name (empty, overly long, or otherwise rejected by a policy).
InvalidValue
Invalid value supplied (NaN, non-finite, out-of-range, or otherwise invalid).
Fields
Overflow
Arithmetic would overflow the counter or index (checked variants only).
Underflow
Arithmetic would underflow (checked variants only).
OverLimit
Operation would exceed a configured limit (rate limiting, quotas, etc.).
WouldBlock
Operation would block and a non-blocking/try path was requested.
NotInitialized
Global metrics were not initialized and the operation requires initialization.
Config(String)
Configuration error with details.
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()
Source§impl PartialEq for MetricsError
impl PartialEq for MetricsError
impl StructuralPartialEq for MetricsError
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