A set of flash cards for the Rust programming language, based on the book The Rust Programming Language.
If this helped you learn Rust, consider sending the author a donation.
BTC: 1MecLehGEMAPxBmDzTVNNYFHc35NaeZhMm
Ko-fi: https://Ko-fi.com/argparse
Unverified Content
Use with discretion, this content may not be accurate or up to date.
Updated
License: Creative Commons Attribution-ShareAlike
You may use, modify, and share this content if you provide attribution and share derivatives under the same license.
Front Start a new binary project | Back `cargo new --bin project_name`
Creates a new folder with necessary files |
Front What is lifetime about? | Back Connecting the lifetime of paramaters with its return values in a function.
It's about letting the... |
Front ```
let string = String::from("5")
let number: u32 = string.parse() // we need to do something here
... | Back ```
let number: u32 = match string.parse() {
Ok(num) => num,
Err(_) => panic!("fails")
}
... |
Front what is "if let"?
Make an example using the option type. | Back A more concise way of doing match, but non-exaustive. It's a bit like the ternary operator in python... |
Front What does /// do in your code | Back It's documentation comments. It supports markdown. |
Download the #1 distraction-free learning app for iOS and Android
5 minutes a day · 90% retention rate · Study anywhere, anytime