It is possible to perform pattern matching in [[Rust]] by using the `match` clause. A `match` expression is made up of _arms_ that consist of a _pattern_ to match against, and the code to be run in case it evaluates to `true`.
Take this example extracted from [The Rust Programming Language](https://doc.rust-lang.org/book/ch02-00-guessing-game-tutorial.html#comparing-the-guess-to-the-secret-number)
```rust
use rand::Rng;
use std::cmp::Ordering;
use std::io;
fn main() {
// --snip--
println!("You guessed: {guess}");
match guess.cmp(&secret_number) {
Ordering::Less => println!("Too small!"),
Ordering::Greater => println!("Too big!"),
Ordering::Equal => println!("You win!"),
}
}
```