Okay, we're ready to actually begin writing some Rust code. In this chapter, we're going to look at how Rust programs are structured, and how an assortment of common programming elements are expressed in the language. We'll start with functions and modules, then move on to fundamental language features, such as branching, looping, and data structures. Almost everything we're covering in this chapter has an equivalent in most other programming languages; these are the fundamentals of programming.
Specifically, this chapter describes the following:
- Functions, which are somewhat like miniature programs that are part of the larger program
- Modules, which are used to organize the program
- Expressions, which are how we tell the program to actually do specific things
- Branching, which is how we tell the program to make a decision
- Looping...