January 2019
Intermediate to advanced
520 pages
14h 32m
English
Before improving the microservice, add all the necessary dependencies to Cargo.toml:
failure = "0.1"futures = "0.1"hyper = "0.12"rand = "0.5"serde = "1.0"serde_derive = "1.0"serde_json = "1.0"base64 = "0.9"base64-serde = "0.3"
We're using a lot of dependencies that work well with each other, thanks to Rust and crates. As you might have noticed, we have added the base64 crate and the base64-serde crate. The first is a binary-to-text converter and the second is necessary to work with a converter in the serialization processes of serde. Import all of these to main.rs:
#[macro_use]extern crate failure;extern crate futures;extern crate hyper;extern crate rand;extern crate serde;#[macro_use]extern crate serde_derive;extern crate serde_json; ...
Read now
Unlock full access