Enum pact_mock_server::MatchResult [] [src]

pub enum MatchResult {
    RequestMatch(Interaction),
    RequestMismatch(Interaction, Vec<Mismatch>),
    RequestNotFound(Request),
    MissingRequest(Interaction),
}

Enum to define a match result

Variants

RequestMatch(Interaction)

Match result where the request was sucessfully matched

RequestMismatch(Interaction, Vec<Mismatch>)

Match result where there were a number of mismatches

RequestNotFound(Request)

Match result where the request was not expected

MissingRequest(Interaction)

Match result where an expected request was not received

Methods

impl MatchResult
[src]

fn match_key(&self) -> String

Returns the match key for this mismatch

fn matched(&self) -> bool

Returns true if this match result is a RequestMatch

fn to_json(&self) -> Json

Converts this match result to a Json struct

Trait Implementations

impl PartialEq for MatchResult
[src]

fn eq(&self, __arg_0: &MatchResult) -> bool

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

fn ne(&self, __arg_0: &MatchResult) -> bool

This method tests for !=.

impl Clone for MatchResult
[src]

fn clone(&self) -> MatchResult

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 Debug for MatchResult
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.