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 learn about Result type in Rust and how it helps us write better programs where we not only can throw relevant errors, but also catch errors from 3rd party APIs.
Timestamps:
00:00 - Error Handling
00:09 - Returning values or errors
01:06 - Create a simple result
03:04 - We will talk about Box in the Pointers chapter
03:16 - Matching results
04:27 - Void result values or errors
05:58 - Expecting a value from Result
08:13 - Expecting an error from Result
09:25 - Check Ok and Err with if-statement
10:14 - Early exit from Result errors
13:06 - Map Ok in Result
15:16 - Map Err in Result
17:41 - Even the main function can return Result
19:52 - There is more to error handling
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!