Struct galvanic_assert::matchers::collection::HasEntry
[−]
[src]
pub struct HasEntry<K, V> { /* fields omitted */ }
Matches if the map-like collection contains the given key/value pair.
The Matcher
tests for this by converting the map-like data structure
into a key/value pair iterator.
The alternative would be to use the Index trait though experiments showed
that this would not be composable with all_of!
or any_of!
.
Trait Implementations
impl<'a, K, V, M> Matcher<'a, M> for HasEntry<K, V> where
V: PartialEq + Debug + 'a,
K: PartialEq + Debug + 'a,
&'a M: IntoIterator<Item = (&'a K, &'a V)> + 'a,
[src]
V: PartialEq + Debug + 'a,
K: PartialEq + Debug + 'a,
&'a M: IntoIterator<Item = (&'a K, &'a V)> + 'a,
fn check(&self, map: &'a M) -> MatchResult
Checks the passed value if it satisfies the Matcher
. Read more