-
Book Overview & Buying
-
Table Of Contents
Asynchronous Programming in Rust
By :
Note
You’ll find this example in the book’s repository in the ch10/b-rust-futures-experiments folder. The different experiments will be implemented as different versions of the async_main function numbered chronologically. I’ll indicate which function corresponds with which function in the repository example in the heading of the code snippet.
Before we start experimenting, let’s copy everything we have now to a new folder:
b-rust-futures-experiments.a-rust-futures folder to the new folder.Cargo.toml and change the name attribute to b-rust-futures-experiments.The first experiment will be to exchange our very limited HTTP client with a proper one.
The easiest way to do that is to simply pick another production-quality HTTP client library that supports async Rust and use that instead.
So, when trying to find a suitable replacement for...