mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-12 05:39:19 +00:00
11 lines
411 B
Markdown
11 lines
411 B
Markdown
# Match
|
|
|
|
Rust provides pattern matching via the match keyword, which can be used like a C switch.
|
|
The first matching arm is evaluated and all possible values must be covered.
|
|
|
|
|
|
## Further information
|
|
|
|
- [Match Destructuring](https://doc.rust-lang.org/stable/rust-by-example/flow_control/match/destructuring.html)
|
|
- [Match Guards](https://doc.rust-lang.org/stable/rust-by-example/flow_control/match/guard.html)
|