pub enum MetricError {
OperationNotOpen {
metric_id: String,
state: OperationLifecycle,
},
InsufficientActive {
metric_id: String,
requested: u64,
available: u64,
},
TotalExceeded {
metric_id: String,
total: u64,
attempted: u64,
},
CountOverflow {
metric_id: String,
},
}Expand description
Failure while reading or mutating one stateful metric.
Variants§
OperationNotOpen
The enclosing operation is freezing or already closed.
Fields
§
state: OperationLifecycleLifecycle state that rejected the transition.
InsufficientActive
A completion delta attempted to consume more active work than exists.
Fields
TotalExceeded
A transition would exceed the configured total.
Fields
CountOverflow
Metric arithmetic overflowed.
Trait Implementations§
Source§impl Clone for MetricError
impl Clone for MetricError
Source§fn clone(&self) -> MetricError
fn clone(&self) -> MetricError
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 MetricError
impl Debug for MetricError
Source§impl Display for MetricError
impl Display for MetricError
impl Eq for MetricError
Source§impl Error for MetricError
impl Error for MetricError
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 MetricError
impl PartialEq for MetricError
impl StructuralPartialEq for MetricError
Auto Trait Implementations§
impl Freeze for MetricError
impl RefUnwindSafe for MetricError
impl Send for MetricError
impl Sync for MetricError
impl Unpin for MetricError
impl UnsafeUnpin for MetricError
impl UnwindSafe for MetricError
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