#[non_exhaustive]pub enum MetricOutcome {
Scored {
definition: Definition,
reference: f64,
measured: f64,
},
Withheld(Withheld),
Failed(Failure),
}Expand description
A metric compared, withheld, or failed. Never a zero standing in for a missing value.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Scored
Both sides have a value for the same defined quantity.
Fields
§
definition: DefinitionThe quantity both values are.
Withheld(Withheld)
Not compared, and why.
Failed(Failure)
Not scored, and a failure of the comparison.
Implementations§
Source§impl MetricOutcome
impl MetricOutcome
Sourcepub fn difference(&self) -> Option<f64>
pub fn difference(&self) -> Option<f64>
measured − reference, for a scored metric.
Trait Implementations§
Source§impl Clone for MetricOutcome
impl Clone for MetricOutcome
Source§fn clone(&self) -> MetricOutcome
fn clone(&self) -> MetricOutcome
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 moreimpl Copy for MetricOutcome
Source§impl Debug for MetricOutcome
impl Debug for MetricOutcome
Source§impl<'de> Deserialize<'de> for MetricOutcome
impl<'de> Deserialize<'de> for MetricOutcome
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for MetricOutcome
impl PartialEq for MetricOutcome
Source§fn eq(&self, other: &MetricOutcome) -> bool
fn eq(&self, other: &MetricOutcome) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for MetricOutcome
impl Serialize for MetricOutcome
impl StructuralPartialEq for MetricOutcome
Auto Trait Implementations§
impl Freeze for MetricOutcome
impl RefUnwindSafe for MetricOutcome
impl Send for MetricOutcome
impl Sync for MetricOutcome
impl Unpin for MetricOutcome
impl UnsafeUnpin for MetricOutcome
impl UnwindSafe for MetricOutcome
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