Trait humphrey::app::StatelessRequestHandler [−][src]
Expand description
Represents a function able to handle a request.
It is passed only the request, and must return a response.
If you want access to the app’s state, consider using the RequestHandler
trait instead.
Example
The most basic stateless request handler would be as follows:
fn handler(request: Request) -> Response {
Response::new(StatusCode::OK, b"Success", &request)
}