Part of the Rust Crash Course: https://www.youtube.com/playlist?list=PL6yRaaP0WPkWRsXJgdnw9lj1vchAaKwfS

Welcome to the Rust Crash Course

In this course, we will be learning Rust from scratch. This course is very fast paced and designed for programmers who already have some experience with another programming language such as Dart or JavaScript or Swift. We will talk about variables, constants, ownership, functions, structures, enumerations, collections such as tuples, vectors, hash-maps and iterators, optionals, error handling, lifetime specifiers, traits, pointers, generics, packages, crates, modules and paths, asynchronous programming and we will also create 2 sample applications using Rust to put all these concepts to use!

In this chapter we will put our knowledge of Rust into use and make an API call with the GET method in order to retrieve the contents of a JSON endpoint, parse it and display its contents to the user!

Timestamps:
00:00 - Sample Project: Car Manufacturers
00:42 - Search a DB of car manufacturers
01:36 - Create a new binary package/crate
02:01 - Set your project settings
02:56 - Add serde_json to your Cargo.toml
03:31 - Add reqwest to your Cargo.toml
03:55 - Add tokio to your Cargo.toml
04:16 - Set up clippy
04:43 - Pass argument to your executable
06:32 - Use std::env for reading arguments
06:47 - Define your API_URL
07:28 - Define a Manufacturer struct
07:54 - Define "name" for the manufacturer
08:18 - Define "common_name" for the manufacturer
08:25 - Define "country" for the manufacturer
08:34 - Create a "Contains" trait
09:17 - Implement "Contains" for "Manufacturer"
10:38 - Implement a "description()" function for "Manufacturer"
12:40 - Mark your main function as an async tokio function
12:55 - Make your main function an async function
13:34 - Read all arguments
13:56 - Abort the program if no arguments are passed
14:42 - Store your keyword into a variable
15:07 - Read the response and parse it as JSON
19:12 - Grab the manufacturer JSON objects
26:15 - Find the results array
26:22 - Parse all the manufacturers
28:56 - Find the relevant manufacturers
30:42 - Tell the user if no manufacturers are found
32:02 - Print all manufacturers that were found to the console


If you want to support my work, please consider joining my YouTube channel by pressing the Join button!

Twitter: https://twitter.com/vandadnp
LinkedIn: https://linkedin.com/in/vandadnp

Let's get started!