The Struct Type
How to define, instantiate, and use structs in Rust, including update syntax, field init shorthand, and tuple structs.
Posts, notes, and digests — building the things, mostly in Rust
How to define, instantiate, and use structs in Rust, including update syntax, field init shorthand, and tuple structs.
Build a small Rust program that takes user input from the terminal and constructs a greeting, using functions for separation of concerns.
Rust's three loop types: loop, while, and for, including returning values from loops and using ranges.
Using if, else, and else if expressions in Rust to control program flow, including conditional variable assignment.
Declaring functions in Rust, with parameters, return values, and the difference between statements and expressions.