Enum pact_matching::Mismatch[][src]

pub enum Mismatch {
    MethodMismatch {
        expected: String,
        actual: String,
    },
    PathMismatch {
        expected: String,
        actual: String,
        mismatch: String,
    },
    StatusMismatch {
        expected: u16,
        actual: u16,
    },
    QueryMismatch {
        parameter: String,
        expected: String,
        actual: String,
        mismatch: String,
    },
    HeaderMismatch {
        key: String,
        expected: String,
        actual: String,
        mismatch: String,
    },
    BodyTypeMismatch {
        expected: String,
        actual: String,
    },
    BodyMismatch {
        path: String,
        expected: Option<Vec<u8>>,
        actual: Option<Vec<u8>>,
        mismatch: String,
    },
}

Enum that defines the different types of mismatches that can occur.

Variants

Request Method mismatch

Fields of MethodMismatch

Expected request method

Actual request method

Request Path mismatch

Fields of PathMismatch

expected request path

actual request path

description of the mismatch

Response status mismatch

Fields of StatusMismatch

expected response status

actual response status

Request query mismatch

Fields of QueryMismatch

query parameter name

expected value

actual value

description of the mismatch

Header mismatch

Fields of HeaderMismatch

header key

expected value

actual value

description of the mismatch

Mismatch in the content type of the body

Fields of BodyTypeMismatch

expected content type of the body

actual content type of the body

Body element mismatch

Fields of BodyMismatch

path expression to where the mismatch occured

expected value

actual value

description of the mismatch

Methods

impl Mismatch
[src]

Converts the mismatch to a Value struct.

Returns the type of the mismatch as a string

Returns a summary string for this mismatch

Returns a formated string for this mismatch

Returns a formated string with ansi escape codes for this mismatch

Trait Implementations

impl Debug for Mismatch
[src]

Formats the value using the given formatter. Read more

impl Clone for Mismatch
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Mismatch
[src]

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

This method tests for !=.

Auto Trait Implementations

impl Send for Mismatch

impl Sync for Mismatch