pub trait Responder:
'static
+ Send
+ Sync {
// Required method
fn handle<'life0, 'async_trait>(
&'life0 self,
req: Request,
) -> Pin<Box<dyn Future<Output = Result<ResponseBody>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn type_name(&self) -> &str { ... }
}
Expand description
Reply a response to request. It should be used with MockServer.