Sort keys into Pak Kuncoro's drawers with real rustc: enums, match, Option, Result and ?. 16 levels, played right in the browser with nothing to install.
An enum lists every shape a value can have: a key can be a house key, a bike key or a padlock, and nothing else. match checks that value arm by arm from the top and runs the first arm whose pattern fits. At Mr. Kuncoro's kiosk the match is the cabinet of drawers: one drawer per arm, its pattern on the tag. The program on the kiosk's computer is compiled and run by the real rustc 1.99, so even its error messages are Rust's own.
Enum variants can carry data, each in its own shape: tuple variants like Motor(String) and struct variants like Rumah { pemilik: String, gerigi: u8 }. A pattern opens the same shape and binds what is inside to new names, so the arm can use it.
Other languages use null for "no value", and programs blow up when someone forgets to check. Rust uses an ordinary enum: Option<T> is Some(value) or its empty variant. Because it is an enum, a match on an Option has to handle both, so the empty case cannot be forgotten.
let ... else is a let whose pattern can fail. When it fits, the names in the pattern can be used in the rest of the function. When it does not, the else block runs, and that block must leave the function. Just right for "if there is nothing, go home" at the start of a function.
Result<T, E> is the enum for work that can fail: Ok(value) or Err(error). An error is an ordinary value that is returned, not an exception that is thrown. The ? operator shortens the check: on Ok, take what is inside; on Err, return that error to the caller right now.
Patterns stack as deep as the data: a variant inside a field inside a variant, all matched at once. matches!(value, pattern) answers whether a value fits a pattern without writing a whole match. Handy in a filter or an if.