Enum mockito::Matcher
[−]
[src]
pub enum Matcher { Exact(String), Regex(String), Any, Missing, }
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.
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
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl PartialEq for Matcher
[src]
fn eq(&self, __arg_0: &Matcher) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Matcher) -> bool
This method tests for !=
.