match
Powerful pattern matching.
Syntax
match value { x => ..., _ => ... }Description
A powerful version of switch. _ means 'all other cases' and ALL cases must be handled.
Example
Loading editor…
Expected output
Tue
When to use?
State checking, enum processing.