pub struct EachClaim<'f, 'v, T> { /* private fields */ }Expand description
Per-sample scalar claim builder returned by
SeriesField::each. Provides at_least / at_most /
between — comparators that apply to every (successfully
projected) sample independently. Per-sample errors from the
projection (missing field, type mismatch) are routed through
the verdict as failures so coverage gaps are never silent.
Implementations§
Source§impl<'f, 'v, T> EachClaim<'f, 'v, T>
impl<'f, 'v, T> EachClaim<'f, 'v, T>
Sourcepub fn at_least(self, floor: T) -> &'v mut Verdict
pub fn at_least(self, floor: T) -> &'v mut Verdict
Pass when every sample’s value satisfies value >= floor.
Per-sample errors and per-sample violations both record a
DetailKind::Temporal detail and flip the verdict to
failed; the chain returns the verdict so further claims
can stack.
On T = f64, an incomparable value (NaN) is a failure: a
NaN sample silently passing value < floor/value > ceiling
(which IEEE-754 semantics give you on raw </>) would
hide a coverage gap, so the pattern uses partial_cmp and
reports the offending sample distinctly.
Sourcepub fn at_most(self, ceiling: T) -> &'v mut Verdict
pub fn at_most(self, ceiling: T) -> &'v mut Verdict
Pass when every sample’s value satisfies value <= ceiling.
NaN samples (on T = f64) report an incomparable failure
for the same reason documented on Self::at_least.
Sourcepub fn between(self, lo: T, hi: T) -> &'v mut Verdict
pub fn between(self, lo: T, hi: T) -> &'v mut Verdict
Pass when every sample’s value satisfies lo <= value <= hi.
Caller error (lo > hi) lands as a single
DetailKind::Temporal detail rather than evaluating each
sample against an inverted range. NaN samples report an
incomparable failure (see Self::at_least).
Auto Trait Implementations§
impl<'f, 'v, T> Freeze for EachClaim<'f, 'v, T>
impl<'f, 'v, T> RefUnwindSafe for EachClaim<'f, 'v, T>where
T: RefUnwindSafe,
impl<'f, 'v, T> Send for EachClaim<'f, 'v, T>where
T: Sync,
impl<'f, 'v, T> Sync for EachClaim<'f, 'v, T>where
T: Sync,
impl<'f, 'v, T> Unpin for EachClaim<'f, 'v, T>
impl<'f, 'v, T> !UnwindSafe for EachClaim<'f, '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