In this part, we look into learning the basics of the Rust programming language. Rust is a modern systems programming language that emphasizes safety, performance, and concurrency. It achieves memory safety without a garbage collector through a unique ownership system.
Control Flow and Pattern Matching.
Control flow is done quite differently in imperative versus functional programming languages.
However, we try to take what you learned from and apply those principles to Rust β and we get something many Rust programmers would consider idiomatic code.
Structs, Enums, and Error Handling.
Creating custom data types is an essential skill, and thatβs why we look at it both from a functional and an imperative point of view.
We will also study some details of memory management and how data is laid out in memory.
Collections and Iteration.
Loops will be discussed both from a functional and an imperative point of view.
Generics and Traits.
Here we take what we learned from polymorphism in to another level.
You will learn to use traits to write high quality generic code, and learn the key principles of solid API design.
Modules and Testing briefly showcases how to organize larger Rust programs into modules and packages, and how to write tests for your code.
The following diagram highlights the dependencies between the chapters in part 1 and part 2 (this part).
A solid arrow from chapter to a chapter means that is a strict prerequisite to .
A strict prerequisite in this context means that uses terminology and concepts introduced in .
A dotted arrow from to indicates a weak prerequisite.
A prerequisite is weak if it contains useful and related concepts, but not strictly necessary to understand .