pub struct SetClaim<'a, T: Ord + Debug> { /* private fields */ }Expand description
Per-claim builder for BTreeSet<T> values. Same kind / because
modifiers as ClaimBuilder; comparator surface is set-specific.
Implementations§
Source§impl<'a, T: Ord + Debug> SetClaim<'a, T>
impl<'a, T: Ord + Debug> SetClaim<'a, T>
pub fn kind(self, kind: DetailKind) -> Self
pub fn because(self, reason: &'a str) -> Self
Sourcepub fn len_at_most(self, n: usize) -> &'a mut Verdict
pub fn len_at_most(self, n: usize) -> &'a mut Verdict
Pass iff set.len() <= n.
Sourcepub fn len_at_least(self, n: usize) -> &'a mut Verdict
pub fn len_at_least(self, n: usize) -> &'a mut Verdict
Pass iff set.len() >= n.
Sourcepub fn subset_of(self, whitelist: &BTreeSet<T>) -> &'a mut Verdict
pub fn subset_of(self, whitelist: &BTreeSet<T>) -> &'a mut Verdict
Pass iff every element of value is in whitelist. Fails with
the offending elements listed.
Sourcepub fn disjoint_from(self, forbidden: &BTreeSet<T>) -> &'a mut Verdict
pub fn disjoint_from(self, forbidden: &BTreeSet<T>) -> &'a mut Verdict
Pass iff value shares no element with forbidden. Fails with
the offending elements listed.
Auto Trait Implementations§
impl<'a, T> Freeze for SetClaim<'a, T>
impl<'a, T> RefUnwindSafe for SetClaim<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for SetClaim<'a, T>where
T: Sync,
impl<'a, T> Sync for SetClaim<'a, T>where
T: Sync,
impl<'a, T> Unpin for SetClaim<'a, T>
impl<'a, T> !UnwindSafe for SetClaim<'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