pub struct StrMatcher<ExpectedT> { /* private fields */ }Expand description
A matcher which matches equality or containment of a string-like value in a configurable way.
The following matcher methods instantiate this:
Trait Implementations§
Source§impl<ExpectedT, ActualT> Matcher<ActualT> for StrMatcher<ExpectedT>
impl<ExpectedT, ActualT> Matcher<ActualT> for StrMatcher<ExpectedT>
Source§fn matches(&self, actual: ActualT) -> MatcherResult
fn matches(&self, actual: ActualT) -> MatcherResult
Returns whether the condition matches the datum
actual. Read moreSource§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§fn explain_match(&self, actual: ActualT) -> Description
fn explain_match(&self, actual: ActualT) -> Description
Source§impl<ExpectedT> MatcherBase for StrMatcher<ExpectedT>
impl<ExpectedT> MatcherBase for StrMatcher<ExpectedT>
Auto Trait Implementations§
impl<ExpectedT> Freeze for StrMatcher<ExpectedT>where
ExpectedT: Freeze,
impl<ExpectedT> !RefUnwindSafe for StrMatcher<ExpectedT>
impl<ExpectedT> !Send for StrMatcher<ExpectedT>
impl<ExpectedT> !Sync for StrMatcher<ExpectedT>
impl<ExpectedT> Unpin for StrMatcher<ExpectedT>where
ExpectedT: Unpin,
impl<ExpectedT> UnsafeUnpin for StrMatcher<ExpectedT>where
ExpectedT: UnsafeUnpin,
impl<ExpectedT> !UnwindSafe for StrMatcher<ExpectedT>
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
Source§impl<ExpectedT, MatcherT> StrMatcherConfigurator<ExpectedT> for MatcherTwhere
MatcherT: Into<StrMatcher<ExpectedT>>,
impl<ExpectedT, MatcherT> StrMatcherConfigurator<ExpectedT> for MatcherTwhere
MatcherT: Into<StrMatcher<ExpectedT>>,
Source§fn ignoring_leading_whitespace(self) -> StrMatcher<ExpectedT>
fn ignoring_leading_whitespace(self) -> StrMatcher<ExpectedT>
Configures the matcher to ignore any leading whitespace in either the
actual or the expected value. Read more
Source§fn ignoring_trailing_whitespace(self) -> StrMatcher<ExpectedT>
fn ignoring_trailing_whitespace(self) -> StrMatcher<ExpectedT>
Configures the matcher to ignore any trailing whitespace in either the
actual or the expected value. Read more
Source§fn ignoring_outer_whitespace(self) -> StrMatcher<ExpectedT>
fn ignoring_outer_whitespace(self) -> StrMatcher<ExpectedT>
Configures the matcher to ignore both leading and trailing whitespace in
either the actual or the expected value. Read more
Source§fn ignoring_ascii_case(self) -> StrMatcher<ExpectedT>
fn ignoring_ascii_case(self) -> StrMatcher<ExpectedT>
Configures the matcher to ignore ASCII case when comparing values. Read more
Source§fn ignoring_unicode_case(self) -> StrMatcher<ExpectedT>
fn ignoring_unicode_case(self) -> StrMatcher<ExpectedT>
Configures the matcher to ignore Unicode case when comparing values. Read more