pub struct DistanceMetricSelection { /* private fields */ }Expand description
One selected component-distance formula ready for extraction and measurement.
Implementations§
Source§impl DistanceMetricSelection
impl DistanceMetricSelection
Sourcepub fn should_be_below(self, threshold: f64) -> MetricThresholdCondition<Self>
pub fn should_be_below(self, threshold: f64) -> MetricThresholdCondition<Self>
Requires every measured value to be strictly below threshold.
Sourcepub fn should_be_above(self, threshold: f64) -> MetricThresholdCondition<Self>
pub fn should_be_above(self, threshold: f64) -> MetricThresholdCondition<Self>
Requires every measured value to be strictly above threshold.
Sourcepub fn should_be(self, threshold: f64) -> MetricThresholdCondition<Self>
pub fn should_be(self, threshold: f64) -> MetricThresholdCondition<Self>
Requires every measured value to equal threshold exactly.
Sourcepub fn should_be_below_or_equal(
self,
threshold: f64,
) -> MetricThresholdCondition<Self>
pub fn should_be_below_or_equal( self, threshold: f64, ) -> MetricThresholdCondition<Self>
Requires every measured value to be below or equal to threshold.
Sourcepub fn should_be_above_or_equal(
self,
threshold: f64,
) -> MetricThresholdCondition<Self>
pub fn should_be_above_or_equal( self, threshold: f64, ) -> MetricThresholdCondition<Self>
Requires every measured value to be above or equal to threshold.
Sourcepub fn measure(&self) -> Result<Vec<MetricMeasurement>, ArchUnitError>
pub fn measure(&self) -> Result<Vec<MetricMeasurement>, ArchUnitError>
Extracts and measures production-source components.
Sourcepub fn measure_with(
&self,
check_options: &CheckOptions,
) -> Result<Vec<MetricMeasurement>, ArchUnitError>
pub fn measure_with( &self, check_options: &CheckOptions, ) -> Result<Vec<MetricMeasurement>, ArchUnitError>
Extracts and measures components with explicit source-target options.
Sourcepub const fn metric(&self) -> DistanceMetric
pub const fn metric(&self) -> DistanceMetric
Returns the selected distance formula.
Sourcepub fn should_satisfy<Predicate>(
self,
predicate: Predicate,
) -> MetricPredicateCondition<Self, Predicate>
pub fn should_satisfy<Predicate>( self, predicate: Predicate, ) -> MetricPredicateCondition<Self, Predicate>
Creates a reusable predicate over each value and complete distance subject.
Trait Implementations§
Source§impl Clone for DistanceMetricSelection
impl Clone for DistanceMetricSelection
Source§fn clone(&self) -> DistanceMetricSelection
fn clone(&self) -> DistanceMetricSelection
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 moreAuto Trait Implementations§
impl Freeze for DistanceMetricSelection
impl RefUnwindSafe for DistanceMetricSelection
impl Send for DistanceMetricSelection
impl Sync for DistanceMetricSelection
impl Unpin for DistanceMetricSelection
impl UnwindSafe for DistanceMetricSelection
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