match (Keyword)
Description: Pattern matching expression. Used for destructuring values and control flow based on patterns.
Example
match value {
Some(x) -> x
None -> 0
}
match status {
Active -> "User is active"
Inactive -> "User is inactive"
}
match value
Some x => x
None => 0
match status
Active => "User is active"
Inactive => "User is inactive"