pub enum MetricsError {
InsufficientData {
required: usize,
actual: usize,
},
DivisionByZero {
context: &'static str,
},
InvalidParameter(String),
}Expand description
Errors that can occur during metrics calculations.
Variants§
InsufficientData
Not enough data points for the calculation.
DivisionByZero
Division by zero would occur.
InvalidParameter(String)
Invalid parameter value.
Trait Implementations§
Source§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 Eq 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 UnsafeUnpin 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