Mastering Rust's Match Control Flow - Full Crash Rust Tutorial for Beginners

preview_player
Показать описание
Discover Rust's powerful control flow construct, "Match." Learn how to compare values against various patterns and execute code based on the matching pattern. Patterns can include literal values, variable names, wildcards, and more. This tutorial covers everything from the basics to advanced uses of "Match" in Rust.

Video Chapters:
0:00 - Introduction to Match
0:46 - Anatomy of a Match Expression
1:45 - Match VS If
3:14 - Match VS Switch: Pattern Matching
5:02 - Match VS Switch: Exhaustiveness
6:46 - Match VS Switch: Binding Values
8:07 - Match VS Switch: Return Values
9:36 - Demo: Match and Enums for Coins, Binding Values
13:18 - Match with Option Enum: Exhaustiveness
17:16 - Catch-all Pattern and _ in Enums
19:04 - Conclusion

Рекомендации по теме
Комментарии
Автор

I love you rust tutorials. Please don’t stop. I’m looking forward to learn more.

I haven’t really found a recent tutorial on rust until you came along.


Thank you Francesco😇😍

megamind
Автор

GDScript with godot uses match statements and it's fantastic, but I think they work slightly more like switch. I don't know enough to compare them yet, but great series!

jahargnl
Автор

What's your opinion about the Match construct in Rust?

francescociulla