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 have a look at what optional values are in Rust and how the Option enumeration represents optionals. We will look at safely unwrapping optional values as well and how we can best use them in a typical Rust application.

Timestamps:
00:00 - Optionals
00:25 - Optionals can either have a value or not
00:52 - Creating options
01:47 - Unwrapping options safely
03:14 - Unwrapping options unsafely
04:02 - Force unwrapping options
04:31 - Mutating option values
05:45 - Unwrapping multiple optionals with tuples
06:50 - Unwrap with default value
07:47 - Unwrap with function
08:25 - Check if Option is "Some" or "None"
09:00 - Unwrap with default value
09:52 - Mapping an Option
10:30 - Functions can return Option as well
10:49 - Options and optionals are used interchangeably


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!