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
Request Method mismatch
Request Path mismatch
Fields of PathMismatch
Response status mismatch
Fields of StatusMismatch
Request query mismatch
Fields of QueryMismatch
Header mismatch
Fields of HeaderMismatch
Mismatch in the content type of the body
Fields of BodyTypeMismatch
Body element mismatch
Fields of BodyMismatch
Message metadata mismatch
Fields of MetadataMismatch
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.
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Wrap the input message T
in a tonic::Request