pub enum Comparison {
Agrees {
authored: f64,
computed: f64,
relative_difference: f64,
},
Disagrees {
authored: f64,
computed: f64,
relative_difference: f64,
},
UnitMismatch {
authored_unit: String,
computed_unit: String,
},
KindMismatch {
authored: QuantityKind,
computed: QuantityKind,
},
NotComparable,
}Expand description
How an authored quantity compares to an externally computed value.
Variants§
Agrees
The file agrees with the computed value within tolerance.
Fields
The authored value.
Disagrees
The file states a different value.
Fields
The authored value.
UnitMismatch
The quantity and the computed value are in different units.
Reported rather than converted: see the module note.
KindMismatch
The quantity does not measure what the caller computed.
Comparing an authored area to a computed volume is a caller error, and
silently returning Disagrees would hide it.
NotComparable
The quantity carries no comparable scalar: complex, unsupported, or
Quantity::Unresolved (a missing or non-numeric value is not
compared as 0).
Trait Implementations§
Source§impl Clone for Comparison
impl Clone for Comparison
Source§impl Debug for Comparison
impl Debug for Comparison
Source§impl PartialEq for Comparison
impl PartialEq for Comparison
impl StructuralPartialEq for Comparison
Auto Trait Implementations§
impl Freeze for Comparison
impl RefUnwindSafe for Comparison
impl Send for Comparison
impl Sync for Comparison
impl Unpin for Comparison
impl UnsafeUnpin for Comparison
impl UnwindSafe for Comparison
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