Trait MockRequestMatcher

Source
pub trait MockRequestMatcher: Send + Sync {
    // Required method
    fn response_for<R, S>(
        &self,
        request: R,
    ) -> Option<Result<R::Response, Error>>
       where R: Request<S>,
             S: Dialect;
}
Expand description

A trait required by the MockClient that allows for different approaches to mocking responses for specific requests.

Required Methods§

Source

fn response_for<R, S>(&self, request: R) -> Option<Result<R::Response, Error>>
where R: Request<S>, S: Dialect,

Provide the corresponding response for the given request (if any).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§