Basics of the Rust Language

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, which is how we tell the program to perform extended actions
  • Structures, which is how we organize information for the program to process
  • Attaching functions to structures or other data types, to make them more useful
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.188.131.255