pub struct MetricSelection { /* private fields */ }Expand description
One selected count metric ready for extraction and measurement.
Implementations§
Source§impl MetricSelection
impl MetricSelection
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 with production-source defaults.
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 with explicit source-target options.
Sourcepub const fn metric(&self) -> CountMetric
pub const fn metric(&self) -> CountMetric
Returns the selected built-in metric.
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 file or type subject.
Trait Implementations§
Source§impl Clone for MetricSelection
impl Clone for MetricSelection
Source§fn clone(&self) -> MetricSelection
fn clone(&self) -> MetricSelection
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 MetricSelection
impl RefUnwindSafe for MetricSelection
impl Send for MetricSelection
impl Sync for MetricSelection
impl Unpin for MetricSelection
impl UnwindSafe for MetricSelection
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