pub struct DisplayMatcher<InnerMatcher> { /* private fields */ }Expand description
A matcher which renders the actual value as a String with Display and
matches the result against the given inner matcher.
Implementations§
Source§impl<InnerMatcher> DisplayMatcher<InnerMatcher>
impl<InnerMatcher> DisplayMatcher<InnerMatcher>
Trait Implementations§
Source§impl<InnerMatcher: Describable> Describable for DisplayMatcher<InnerMatcher>
impl<InnerMatcher: Describable> Describable for DisplayMatcher<InnerMatcher>
Source§fn describe(&self, matcher_result: MatcherResult) -> Description
fn describe(&self, matcher_result: MatcherResult) -> Description
Returns a description of
self or a negative description if
matcher_result is DoesNotMatch. Read moreSource§impl<T: Debug + Display + ?Sized, InnerMatcher: Matcher<String>> Matcher<T> for DisplayMatcher<InnerMatcher>
impl<T: Debug + Display + ?Sized, InnerMatcher: Matcher<String>> Matcher<T> for DisplayMatcher<InnerMatcher>
Source§fn matches(&self, actual: &T) -> MatcherResult
fn matches(&self, actual: &T) -> MatcherResult
Returns whether the condition matches the datum
actual. Read moreSource§fn explain_match(&self, actual: &T) -> Description
fn explain_match(&self, actual: &T) -> Description
Auto Trait Implementations§
impl<InnerMatcher> Freeze for DisplayMatcher<InnerMatcher>where
InnerMatcher: Freeze,
impl<InnerMatcher> RefUnwindSafe for DisplayMatcher<InnerMatcher>where
InnerMatcher: RefUnwindSafe,
impl<InnerMatcher> Send for DisplayMatcher<InnerMatcher>where
InnerMatcher: Send,
impl<InnerMatcher> Sync for DisplayMatcher<InnerMatcher>where
InnerMatcher: Sync,
impl<InnerMatcher> Unpin for DisplayMatcher<InnerMatcher>where
InnerMatcher: Unpin,
impl<InnerMatcher> UnsafeUnpin for DisplayMatcher<InnerMatcher>where
InnerMatcher: UnsafeUnpin,
impl<InnerMatcher> UnwindSafe for DisplayMatcher<InnerMatcher>where
InnerMatcher: UnwindSafe,
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