January 2019
Intermediate to advanced
520 pages
14h 32m
English
Now we can create a server instance and bind to this address:
let builder = Server::bind(&addr);
The preceding line creates a hyper::server::Server instance with a bind constructor that actually returns Builder, not a Server instance. The Server struct implements the Future trait. It has similar role to Result, but describes a value that isn't available immediately. You'll learn more about Future and other traits of the futures crate in Chapter 5, Understanding Asynchronous Operations with the Futures Crate.
Read now
Unlock full access