Trait humphrey::app::RequestHandler [−][src]
Expand description
Represents a function able to handle a request. It is passed the request as well as the app’s state, and must return a response.
Example
The most basic request handler would be as follows:
fn handler(request: Request, _: Arc<()>) -> Response {
Response::new(StatusCode::OK, b"Success", &request)
}