pub struct EqMatcher<A: ?Sized, T> { /* private fields */ }
Expand description

A matcher which matches a value equal to expected.

See eq.

Trait Implementations§

source§

impl<A: ?Sized, T: Deref<Target = str>> From<EqMatcher<A, T>> for StrMatcher<A, T>

source§

fn from(value: EqMatcher<A, T>) -> Self

Converts to this type from the input type.
source§

impl<T: Debug, A: Debug + ?Sized + PartialEq<T>> Matcher for EqMatcher<A, T>

§

type ActualT = A

The type against which this matcher matches.
source§

fn matches(&self, actual: &A) -> MatcherResult

Returns whether the condition matches the datum actual. Read more
source§

fn describe(&self, matcher_result: MatcherResult) -> Description

Returns a description of self or a negative description if matcher_result is DoesNotMatch. Read more
source§

fn explain_match(&self, actual: &A) -> Description

Prepares a String describing how the expected value encoded in this instance matches or does not match the given value actual. Read more
source§

fn and<Right: Matcher<ActualT = Self::ActualT>>( self, right: Right ) -> ConjunctionMatcher<Self, Right>
where Self: Sized,

Constructs a matcher that matches both self and right. Read more
source§

fn or<Right: Matcher<ActualT = Self::ActualT>>( self, right: Right ) -> DisjunctionMatcher<Self, Right>
where Self: Sized,

Constructs a matcher that matches when at least one of self or right matches the input. Read more

Auto Trait Implementations§

§

impl<A: ?Sized, T> RefUnwindSafe for EqMatcher<A, T>

§

impl<A: ?Sized, T> Send for EqMatcher<A, T>
where A: Send, T: Send,

§

impl<A: ?Sized, T> Sync for EqMatcher<A, T>
where A: Sync, T: Sync,

§

impl<A: ?Sized, T> Unpin for EqMatcher<A, T>
where A: Unpin, T: Unpin,

§

impl<A: ?Sized, T> UnwindSafe for EqMatcher<A, T>
where A: UnwindSafe, T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<ActualT, ExpectedT, MatcherT> StrMatcherConfigurator<ActualT, ExpectedT> for MatcherT
where MatcherT: Into<StrMatcher<ActualT, ExpectedT>>, ActualT: ?Sized,

source§

fn ignoring_leading_whitespace(self) -> StrMatcher<ActualT, 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<ActualT, 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<ActualT, 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<ActualT, ExpectedT>

Configures the matcher to ignore ASCII case when comparing values. Read more
source§

fn times( self, times: impl Matcher<ActualT = usize> + 'static ) -> StrMatcher<ActualT, ExpectedT>

Configures the matcher to match only strings which otherwise satisfy the conditions a number times matched by the matcher times. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.