Trait galvanic_assert::Matcher
[−]
[src]
pub trait Matcher<'a, T: 'a> { fn check(&self, actual: &'a T) -> MatchResult; }
The trait which has to be implemented by all matchers.
Required Methods
fn check(&self, actual: &'a T) -> MatchResult
Checks the passed value if it satisfies the Matcher
.
Values are always taken as immutable reference as the actual value shouldn't be changed by the matcher.
Implementors
impl<'a, T: 'a> Matcher<'a, T> for All<'a, T>
impl<'a, T: 'a> Matcher<'a, T> for Any<'a, T>
impl<'a, T, I> Matcher<'a, I> for ContainsInAnyOrder<T> where
T: PartialEq + Debug + 'a,
&'a I: IntoIterator<Item = &'a T> + Debug + 'a,impl<'a, T, I: 'a> Matcher<'a, I> for ContainsInOrder<T> where
T: PartialEq + Debug + 'a,
&'a I: IntoIterator<Item = &'a T> + Debug + 'a,impl<'a, T, I: 'a> Matcher<'a, I> for ContainsSubset<T> where
T: PartialEq + Debug + 'a,
&'a I: IntoIterator<Item = &'a T> + Debug + 'a,impl<'a, T> Matcher<'a, T> for ContainedIn<T> where
T: PartialEq + Debug + 'a,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,impl<'a, K, V, M> Matcher<'a, M> for HasKey<K> where
V: PartialEq + Debug + 'a,
K: PartialEq + Debug + 'a,
&'a M: IntoIterator<Item = (&'a K, &'a V)> + 'a,impl<'a, K, V, M> Matcher<'a, M> for HasValue<V> where
V: PartialEq + Debug + 'a,
K: PartialEq + Debug + 'a,
&'a M: IntoIterator<Item = (&'a K, &'a V)> + 'a,impl<'a, T: 'a, F: ?Sized> Matcher<'a, T> for F where
F: Fn(&'a T) -> MatchResult,