Enum pact_mock_server::matching::MatchResult
source · pub enum MatchResult {
RequestMatch(HttpRequest, HttpResponse, HttpRequest),
RequestMismatch(HttpRequest, HttpRequest, Vec<Mismatch>),
RequestNotFound(HttpRequest),
MissingRequest(HttpRequest),
}
Expand description
Enum to define a match result
Variants§
RequestMatch(HttpRequest, HttpResponse, HttpRequest)
Match result where the request was successfully matched. Stores the expected request, response returned and the actual request that was received.
RequestMismatch(HttpRequest, HttpRequest, Vec<Mismatch>)
Match result where there were a number of mismatches. Stores the expected and actual requests, and all the mismatches.
RequestNotFound(HttpRequest)
Match result where the request was not expected
MissingRequest(HttpRequest)
Match result where an expected request was not received
Implementations§
source§impl MatchResult
impl MatchResult
sourcepub fn cors_preflight(&self) -> bool
pub fn cors_preflight(&self) -> bool
Returns true if this is an unexpected OPTIONS request
Trait Implementations§
source§impl Clone for MatchResult
impl Clone for MatchResult
source§fn clone(&self) -> MatchResult
fn clone(&self) -> MatchResult
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 MatchResult
impl Debug for MatchResult
source§impl Display for MatchResult
impl Display for MatchResult
source§impl PartialEq for MatchResult
impl PartialEq for MatchResult
source§fn eq(&self, other: &MatchResult) -> bool
fn eq(&self, other: &MatchResult) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for MatchResult
Auto Trait Implementations§
impl !Freeze for MatchResult
impl RefUnwindSafe for MatchResult
impl Send for MatchResult
impl Sync for MatchResult
impl Unpin for MatchResult
impl UnwindSafe for MatchResult
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