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 learn about enumerations or enums as they are sometimes also called. Enumerations are great for grouping relevant data in all languages that support them and Rust's implementation of enumerations is very advanced, allowing you to create associated data for your enumerations!

Timestamps:
00:00 - Enumerations
00:04 - Enumerations are useful for related objects
00:45 - Plain enumerations
01:57 - Creating an instance of plain enumerations
02:30 - Comparing enumeration instances with if-statements
04:12 - Using "match" to switch cases
07:01 - Default case
08:15 - Associated values with names
11:36 - Instantiating enums with associated values
12:31 - Comparing enums with associated values
13:53 - Matching enums with associated values
14:50 - Unnamed associated values
16:26 - Instantiating unnamed associated values
17:32 - Comparing unnamed associated values
18:50 - Matching unnamed associated values
19:14 - Implementation of enums with unnamed associated values
22:06 - Match is an expression
24:34 - Enumerations are really useful in Rust


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!