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

Matches the exact path or header value. There's also an implementation of From<&str> to keep things simple and backwards compatible.

Matches a path or header value by a regular expression.

Matches any path or any header value.

Checks that a header is not present in the request.

Trait Implementations

impl Clone for Matcher
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Matcher
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Debug for Matcher
[src]

Formats the value using the given formatter.

impl<'a> From<&'a str> for Matcher
[src]

Performs the conversion.

impl PartialEq<String> for Matcher
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.