pub trait Service<Request, Response> {
// Required method
fn run(
&mut self,
req: Request,
) -> Pin<Box<dyn Future<Output = Response> + Send>>;
}
Expand description
A service converts an HTTP request into a response.
pub trait Service<Request, Response> {
// Required method
fn run(
&mut self,
req: Request,
) -> Pin<Box<dyn Future<Output = Response> + Send>>;
}
A service converts an HTTP request into a response.