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,
mismatch: String,
},
QueryMismatch {
parameter: String,
expected: String,
actual: String,
mismatch: String,
},
HeaderMismatch {
key: String,
expected: String,
actual: String,
mismatch: String,
},
BodyTypeMismatch {
expected: String,
actual: String,
mismatch: String,
expected_body: Option<Bytes>,
actual_body: Option<Bytes>,
},
BodyMismatch {
path: String,
expected: Option<Bytes>,
actual: Option<Bytes>,
mismatch: String,
},
MetadataMismatch {
key: String,
expected: String,
actual: String,
mismatch: String,
},
}
Expand description
Enum that defines the different types of mismatches that can occur.
Variants
MethodMismatch
Request Method mismatch
PathMismatch
Fields
expected: String
expected request path
actual: String
actual request path
mismatch: String
description of the mismatch
Request Path mismatch
StatusMismatch
Fields
expected: u16
expected response status
actual: u16
actual response status
mismatch: String
description of the mismatch
Response status mismatch
QueryMismatch
Fields
parameter: String
query parameter name
expected: String
expected value
actual: String
actual value
mismatch: String
description of the mismatch
Request query mismatch
HeaderMismatch
Fields
key: String
header key
expected: String
expected value
actual: String
actual value
mismatch: String
description of the mismatch
Header mismatch
BodyTypeMismatch
Fields
expected: String
expected content type of the body
actual: String
actual content type of the body
mismatch: String
description of the mismatch
Mismatch in the content type of the body
BodyMismatch
Fields
path: String
path expression to where the mismatch occurred
mismatch: String
description of the mismatch
Body element mismatch
MetadataMismatch
Fields
key: String
key
expected: String
expected value
actual: String
actual value
mismatch: String
description of the mismatch
Message metadata mismatch
Implementations
Returns the type of the mismatch as a string
Returns a formated string for this mismatch
Returns a formatted string with ansi escape codes for this mismatch
Trait Implementations
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for Mismatch
impl UnwindSafe for Mismatch
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
impl<T> Fmt for T where
T: Display,
impl<T> Fmt for T where
T: Display,
Wrap the input message T
in a tonic::Request
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more