Skip to main content

points_to

Function points_to 

Source
pub fn points_to<MatcherT>(expected: MatcherT) -> PointsToMatcher<MatcherT>
Expand description

Matches a reference pointing to a value matched by the Matcher expected.

This is useful for combining matchers, especially when working with iterators.

For example:

verify_that!(&123, points_to(eq(123)))?;
verify_that!(vec![1,2,3], each(points_to(gt(0))))?;