ExploreRust Programming Language
Loading...
Rust Programming Language
LEARN

Rust Programming Language

Jonathan Sundqvist
212 cards

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

Start a new binary project
`cargo new --bin project_name` Creates a new folder with necessary files
What is lifetime about?
Connecting the lifetime of paramaters with its return values in a function. It's about letting the...
``` let string = String::from("5") let number: u32 = string.parse() // we need to do something here ...
``` let number: u32 = match string.parse() { Ok(num) => num, Err(_) => panic!("fails") } ...
what is "if let"? Make an example using the option type.
A more concise way of doing match, but non-exaustive. It's a bit like the ternary operator in python...
What does /// do in your code
It's documentation comments. It supports markdown.
See all
212
cards

Details

Total Cards
212
Version
1.0
Last Updated
October 29, 2022