pub fn all_elements_satisfy<'a, T, I, P>(
predicate: P,
) -> Box<dyn Fn(&'a I) -> MatchResult>
Expand description
Matches if all elements in the asserted collection satisfy the given predicate
.
An empty collection always satisfies this matcher as all (=no) element satisfies the predicate.
#Examples
use galvanic_assert::matchers::collection::*;
assert_that!(&vec![1,2,3,4,5], all_elements_satisfy(|&a| 0 <= a && a < 100));