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 are going to look at different collections in Rust such as tuples, vectors and hash-maps.
Timestamps:
00:00 - Collections
00:07 - Tuples
00:56 - Tuples are heterogeneous collections
01:02 - Creating tuples
01:27 - Direct access to tuples
01:47 - Unpacking tuples
02:03 - Ignoring values in tuples
02:22 - Returning tuples from functions
03:38 - Vectors
03:52 - Defining a fixed size vector
04:22 - Iterating over a fixed size vector
04:45 - Reading values at specific indexes
05:15 - Getting the length of a vector
05:33 - Mapping vectors
06:42 - Vector creation shorthand
07:51 - Mutable vectors
08:04 - Pushing new items to a vector
08:42 - Popping values from vectors
08:51 - Removing all values from a vector
09:15 - Cloning and appending to a vector
10:11 - Moving elements from one vector to another
11:33 - Testing if a vector contains a value
12:02 - Testing if a vector is empty
12:45 - HashMaps
13:06 - HashMaps are dictionaries
13:52 - Inserting values into a HashMap
14:33 - Checking existence of keys in HashMap
15:05 - Removing keys and values from HashMap
15:33 - Unsafely reading values from HashMap
16:19 - Safely reading values from HashMap
17:22 - Iterating over keys and values in HashMap
18:19 - Retrieving an entry in HashMap
19:26 - Matching entries in HashMap
21:00 - Inserting into HashMap if key is absent
22:10 - Inserting custom structs into HashMap
24:21 - Iterators
25:01 - Iterators in Rust are lazy
25:16 - Iterator trait
26:18 - Iterating over items
26:40 - Iterators cannot be double consumed
28:21 - Mapping iterators
29:00 - Collecting iterators
29:46 - Unowned iterators
30:29 - Owned iterators
30:53 - Filtering iterators
31:38 - Iterating over maps
31:57 - Jumping over iterations
32:36 - Breaking out of iterations
33:38 - We will see more examples of collections
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!