Enum pact_matching::Mismatch
source · 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
Request Path mismatch
StatusMismatch
Fields
Response status mismatch
QueryMismatch
Fields
Request query mismatch
HeaderMismatch
Fields
Header mismatch
BodyTypeMismatch
Fields
Mismatch in the content type of the body
BodyMismatch
Fields
Body element mismatch
MetadataMismatch
Fields
Message metadata mismatch
Implementations§
source§impl Mismatch
impl Mismatch
sourcepub fn mismatch_type(&self) -> &str
pub fn mismatch_type(&self) -> &str
Returns the type of the mismatch as a string
sourcepub fn description(&self) -> String
pub fn description(&self) -> String
Returns a formatted string for this mismatch
sourcepub fn ansi_description(&self) -> String
pub fn ansi_description(&self) -> String
Returns a formatted string with ansi escape codes for this mismatch
Trait Implementations§
source§impl Ord for Mismatch
impl Ord for Mismatch
source§impl PartialOrd<Mismatch> for Mismatch
impl PartialOrd<Mismatch> for Mismatch
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Eq for Mismatch
impl StructuralEq for Mismatch
Auto Trait Implementations§
impl RefUnwindSafe for Mismatch
impl Send for Mismatch
impl Sync for Mismatch
impl Unpin for Mismatch
impl UnwindSafe for Mismatch
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request