Pattern Matching in Rust, by Example

Pattern matching is Rust’s most expressive control-flow tool. Once you stop reaching for if/else chains, a lot of code gets both shorter and safer. This is a quick tour with runnable examples.