[−][src]Enum mockito::Matcher
Allows matching the request path or headers in multiple ways: matching the exact value, matching any value (as long as it is present), matching by regular expression or checking that a particular header is missing.
These matchers are used within the mock
and Mock::match_header
calls.
Variants
Exact(String)
Matches the exact path or header value. There's also an implementation of From<&str>
to keep things simple and backwards compatible.
Regex(String)
Matches a path or header value by a regular expression.
Json(Value)
Matches a specified JSON body from a serde_json::Value
JsonString(String)
Matches a specified JSON body from a String
AnyOf(Vec<Matcher>)
At least one must match
Any
Matches any path or any header value.
Missing
Checks that a header is not present in the request.
Trait Implementations
impl Clone for Matcher
[src]
fn clone(&self) -> Matcher
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq<Matcher> for Matcher
[src]
impl<'a> From<&'a str> for Matcher
[src]
impl Debug for Matcher
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,