pub struct ClaimBuilder<'a, T> { /* private fields */ }Expand description
Per-claim builder for scalar values. Produced by Verdict::claim
(and the typed claim_<field> accessors generated by
#[derive(Claim)]). Chain a comparator
(at_least, at_most, lt, gt, between, eq, ne,
is_finite, near) to record the outcome.
Implementations§
Source§impl<'a, T> ClaimBuilder<'a, T>
impl<'a, T> ClaimBuilder<'a, T>
Sourcepub fn kind(self, kind: DetailKind) -> Self
pub fn kind(self, kind: DetailKind) -> Self
Override the DetailKind used on failure. Defaults to
DetailKind::Other; tests with a structural category set it
here so downstream kind-based filters route the failure
correctly.
Source§impl<'a, T> ClaimBuilder<'a, T>
impl<'a, T> ClaimBuilder<'a, T>
Source§impl<'a, T> ClaimBuilder<'a, T>where
T: PartialOrd + Display,
impl<'a, T> ClaimBuilder<'a, T>where
T: PartialOrd + Display,
Sourcepub fn at_least(self, floor: T) -> &'a mut Verdict
pub fn at_least(self, floor: T) -> &'a mut Verdict
Pass when value >= floor; fail with <name>: expected at least <floor>, was <value> otherwise.
Auto Trait Implementations§
impl<'a, T> Freeze for ClaimBuilder<'a, T>where
T: Freeze,
impl<'a, T> RefUnwindSafe for ClaimBuilder<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for ClaimBuilder<'a, T>where
T: Send,
impl<'a, T> Sync for ClaimBuilder<'a, T>where
T: Sync,
impl<'a, T> Unpin for ClaimBuilder<'a, T>where
T: Unpin,
impl<'a, T> !UnwindSafe for ClaimBuilder<'a, 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
Mutably borrows from an owned value. Read more
§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>
Converts
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>
Converts
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