Skip to main content

MatcherExt

Trait MatcherExt 

Source
pub trait MatcherExt<T>:
    TypedMatcher<T>
    + Sized
    + 'static {
    // Provided methods
    fn and<M: TypedMatcher<T> + 'static>(self, matcher: M) -> And<T> { ... }
    fn or<M: TypedMatcher<T> + 'static>(self, matcher: M) -> Or<T> { ... }
}
Expand description

Trait for extending matchers with additional methods

Provided Methods§

Source

fn and<M: TypedMatcher<T> + 'static>(self, matcher: M) -> And<T>

Combines this matcher with another using AND logic

Source

fn or<M: TypedMatcher<T> + 'static>(self, matcher: M) -> Or<T>

Combines this matcher with another using OR logic

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<M, T> MatcherExt<T> for M
where M: TypedMatcher<T> + 'static,

Implementation of MatcherExt for any type that implements TypedMatcher