No More Nulls
Subject: Enumerated (enum) types, pattern matching, and meaningful return types.
NotesToday’s episode discusses, in order:
- Enumerated types, with an eye to the difference between structs and enums, and to the differences between enums in C and in Rust.
- Pattern matching, with a focus on using them with enumerated types and some discussion about how they differ from switch blocks in C-like languages.
- Using the Option and Result enumerated types with pattern matching to provide meaningful returns from functions safely.
There is a specific order to the examples below, and it is not the automatically-alphabetized order rendered by rustdoc. Instead, you should work through in the sequence they appear in the source:
- RelatedishThings
- demonstrate_basic_enumeration
- demonstrate_match
- get_an_option
- demonstrate_option
- get_a_result
- demonstrate_result
- New Rustacean Pull Request #1
- Work on IDE support!
- Landing page
- My chosen tool: JetBrains/IntelliJ
- Rustlings
- Rust FFI Omnibus
- New Rustacean:
- Twitter: @newrustacean
- App.net: @newrustacean
- Patreon
- Email: hello at newrustacean dot com
- Chris Krycho
- Twitter: @chriskrycho
- App.net: @chriskrycho
Fler avsnitt av New Rustacean
Visa alla avsnitt av New RustaceanNew Rustacean med Chris Krycho finns tillgänglig på flera plattformar. Informationen på denna sida kommer från offentliga podd-flöden.
