Enum pact_matching::BodyMatchResult
source · pub enum BodyMatchResult {
Ok,
BodyTypeMismatch {
expected_type: String,
actual_type: String,
message: String,
expected: Option<Bytes>,
actual: Option<Bytes>,
},
BodyMismatches(HashMap<String, Vec<Mismatch>>),
}Expand description
Result of matching a request body
Variants§
Ok
Matched OK
BodyTypeMismatch
Fields
Mismatch in the content type of the body
BodyMismatches(HashMap<String, Vec<Mismatch>>)
Mismatches with the body contents
Implementations§
source§impl BodyMatchResult
impl BodyMatchResult
sourcepub fn mismatches(&self) -> Vec<Mismatch> ⓘ
pub fn mismatches(&self) -> Vec<Mismatch> ⓘ
Returns all the mismatches
sourcepub fn all_matched(&self) -> bool
pub fn all_matched(&self) -> bool
If all the things matched OK
Trait Implementations§
source§impl Clone for BodyMatchResult
impl Clone for BodyMatchResult
source§fn clone(&self) -> BodyMatchResult
fn clone(&self) -> BodyMatchResult
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for BodyMatchResult
impl Debug for BodyMatchResult
source§impl PartialEq<BodyMatchResult> for BodyMatchResult
impl PartialEq<BodyMatchResult> for BodyMatchResult
source§fn eq(&self, other: &BodyMatchResult) -> bool
fn eq(&self, other: &BodyMatchResult) -> bool
impl StructuralPartialEq for BodyMatchResult
Auto Trait Implementations§
impl RefUnwindSafe for BodyMatchResult
impl Send for BodyMatchResult
impl Sync for BodyMatchResult
impl Unpin for BodyMatchResult
impl UnwindSafe for BodyMatchResult
Blanket Implementations§
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