If you have ever worked with HTTP in Rust, you have probably referred to the hyper crate. Hyper provides a safe abstraction over HTTP and offers both a client and server type. It is also the foundation for frameworks such as Iron and Nickel.
One of the coolest things about hyper is that its server can be started with anything that implements the Handler trait. There is one required method called handle and it denotes how the type which implements it should respond to an incoming connection.