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 for RequestMatchResult
impl PartialEq for RequestMatchResult
source§fn eq(&self, other: &RequestMatchResult) -> bool
fn eq(&self, other: &RequestMatchResult) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for RequestMatchResult
Auto Trait Implementations§
impl !Freeze for RequestMatchResult
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
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> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§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