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.
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
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.