extern crate hyper; extern crate hyper_router; use hyper::header::{CONTENT_LENGTH, CONTENT_TYPE}; use hyper::rt::Future; use hyper::server::Server; use hyper::{Body, Method, Request, Response}; use hyper_router::{Route, RouterBuilder, RouterService}; fn request_handler(_: Request
) -> Response { let body = "Hello World"; Response::builder() .header(CONTENT_LENGTH, body.len() as u64) .header(CONTENT_TYPE, "text/plain") .body(Body::from(body)) .expect("Failed to construct the response") } fn router_service() -> Result