#[non_exhaustive]pub enum MetricComparison {
Below,
Above,
Equal,
BelowOrEqual,
AboveOrEqual,
}Expand description
One exact numeric relationship used by the five threshold verbs.
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.
Below
The value must be strictly smaller than the threshold.
Above
The value must be strictly larger than the threshold.
Equal
The value must equal the threshold exactly.
BelowOrEqual
The value must be smaller than or equal to the threshold.
AboveOrEqual
The value must be larger than or equal to the threshold.
Implementations§
Source§impl MetricComparison
impl MetricComparison
Sourcepub fn is_satisfied(self, value: f64, threshold: f64) -> bool
pub fn is_satisfied(self, value: f64, threshold: f64) -> bool
Returns whether value satisfies this exact comparison against threshold.
Trait Implementations§
Source§impl Clone for MetricComparison
impl Clone for MetricComparison
Source§fn clone(&self) -> MetricComparison
fn clone(&self) -> MetricComparison
Returns a copy 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 MetricComparison
impl Debug for MetricComparison
Source§impl Display for MetricComparison
impl Display for MetricComparison
Source§impl Hash for MetricComparison
impl Hash for MetricComparison
Source§impl Ord for MetricComparison
impl Ord for MetricComparison
Source§fn cmp(&self, other: &MetricComparison) -> Ordering
fn cmp(&self, other: &MetricComparison) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for MetricComparison
impl PartialEq for MetricComparison
Source§impl PartialOrd for MetricComparison
impl PartialOrd for MetricComparison
impl Copy for MetricComparison
impl Eq for MetricComparison
impl StructuralPartialEq for MetricComparison
Auto Trait Implementations§
impl Freeze for MetricComparison
impl RefUnwindSafe for MetricComparison
impl Send for MetricComparison
impl Sync for MetricComparison
impl Unpin for MetricComparison
impl UnwindSafe for MetricComparison
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.