Struct pact_matching::RequestMatchResult
source · pub struct RequestMatchResult {
pub method: Option<Mismatch>,
pub path: Option<Vec<Mismatch>>,
pub body: BodyMatchResult,
pub query: HashMap<String, Vec<Mismatch>>,
pub headers: HashMap<String, Vec<Mismatch>>,
}Expand description
Result of matching a request
Fields§
§method: Option<Mismatch>Method match result
path: Option<Vec<Mismatch>>Path match result
body: BodyMatchResultBody match result
query: HashMap<String, Vec<Mismatch>>Query parameter result
headers: HashMap<String, Vec<Mismatch>>Headers result
Implementations§
source§impl RequestMatchResult
impl RequestMatchResult
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
sourcepub fn method_or_path_mismatch(&self) -> bool
pub fn method_or_path_mismatch(&self) -> bool
If there was a mismatch with the method or path
Trait Implementations§
source§impl Clone for RequestMatchResult
impl Clone for RequestMatchResult
source§fn clone(&self) -> RequestMatchResult
fn clone(&self) -> RequestMatchResult
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 RequestMatchResult
impl Debug for RequestMatchResult
source§impl PartialEq<RequestMatchResult> for RequestMatchResult
impl PartialEq<RequestMatchResult> for RequestMatchResult
source§fn eq(&self, other: &RequestMatchResult) -> bool
fn eq(&self, other: &RequestMatchResult) -> bool
impl StructuralPartialEq for RequestMatchResult
Auto Trait Implementations§
impl RefUnwindSafe for RequestMatchResult
impl Send for RequestMatchResult
impl Sync for RequestMatchResult
impl Unpin for RequestMatchResult
impl UnwindSafe for RequestMatchResult
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