EPISODE · Oct 21, 2015 · 16 MIN
e003: No. more. nulls.
from New Rustacean · host Chris Krycho
No More Nulls Subject: Enumerated (enum) types, pattern matching, and meaningful return types. Notes Today’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. Order 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 Links New Rustacean Pull Request #1 Work on IDE support! Landing page My chosen tool: JetBrains/IntelliJ Rustlings Rust FFI Omnibus Follow/Support New Rustacean: Twitter: @newrustacean App.net: @newrustacean Patreon Email: <!-- h='newrustacean.com';a='@';n='hello';e=n+a+h; document.write(''+e+''); // --> hello at newrustacean dot com Chris Krycho Twitter: @chriskrycho App.net: @chriskrycho
What this episode covers
No More Nulls - Date: October 21, 2015 - Subject: Enumerated (`enum`) types, pattern matching, and meaningful return values. # Notes Today’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. ## Order 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: 1. RelatedishThings 2. demonstrate_basic_enumeration 3. demonstrate_match 4. get_an_option 5. demonstrate_option 6. get_a_result 7. demonstrate_result
NOW PLAYING
e003: No. more. nulls.
No transcript for this episode yet
Similar Episodes
Mar 31, 2026 ·54m
Mar 27, 2026 ·14m
Mar 24, 2026 ·42m
Mar 20, 2026 ·42m
Mar 17, 2026 ·41m
Mar 13, 2026 ·44m