pub struct CrossPhaseRatio<'v, T> { /* private fields */ }Expand description
Cross-phase ratio builder returned by
SeriesField::ratio_across_phases and
PhaseMapExt::ratio_across_phases. Carries the resolved
(earlier, later) values and a caller-supplied label so the
terminal comparator chain (at_most) can format both values
and the ratio into a single failure-or-note message. Mirrors
the EachClaim shape (mutable verdict borrow held through
the chain).
The label is origin-neutral: SeriesField’s entry point fills
it from the field’s .label(), the PhaseMap entry point takes
it from the caller. An empty label suppresses the leading
label: / [label] prefix in the rendered message so the
rest of the diagnostic stays readable.
Implementations§
Source§impl<'v, T> CrossPhaseRatio<'v, T>
impl<'v, T> CrossPhaseRatio<'v, T>
Sourcepub fn at_most(self, ceiling: f64) -> &'v mut Verdict
pub fn at_most(self, ceiling: f64) -> &'v mut Verdict
Pass when later_value / earlier_value <= ceiling. On
failure records a DetailKind::Temporal detail naming
the field label, both phase values, the computed ratio,
and the ceiling so the failure message is self-contained.
On success records an info note with the same trio so a
--nocapture run surfaces the headroom without a separate
per-metric println!.
Auto Trait Implementations§
impl<'v, T> Freeze for CrossPhaseRatio<'v, T>where
T: Freeze,
impl<'v, T> RefUnwindSafe for CrossPhaseRatio<'v, T>where
T: RefUnwindSafe,
impl<'v, T> Send for CrossPhaseRatio<'v, T>where
T: Send,
impl<'v, T> Sync for CrossPhaseRatio<'v, T>where
T: Sync,
impl<'v, T> Unpin for CrossPhaseRatio<'v, T>where
T: Unpin,
impl<'v, T> !UnwindSafe for CrossPhaseRatio<'v, T>
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more