Struct httptest::matchers::ExecutionContext
source · pub struct ExecutionContext { /* private fields */ }
Expand description
An ExecutionContext tracks how Matchers are chained together. There is a single public method called chain that when used to chain input from one matcher to another will allow tracking the flow of data across composable matchers.
Implementations§
source§impl ExecutionContext
impl ExecutionContext
sourcepub fn evaluate<M, I>(matcher: &mut M, input: &I) -> bool
pub fn evaluate<M, I>(matcher: &mut M, input: &I) -> bool
Evaluate the given matcher with the provided input.
sourcepub fn chain<M, I>(&mut self, matcher: &mut M, input: &I) -> bool
pub fn chain<M, I>(&mut self, matcher: &mut M, input: &I) -> bool
Invoke the provided matcher with the provided input. This is equivalent
to invoking matcher.matches(input)
, but allows tracking the execution
flow to provide better diagnostics about why a request did or did not
match a composed set of matchers.
Auto Trait Implementations§
impl RefUnwindSafe for ExecutionContext
impl Send for ExecutionContext
impl Sync for ExecutionContext
impl Unpin for ExecutionContext
impl UnwindSafe for ExecutionContext
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