4 Data structures

This chapter covers

  • Using Rust’s core data structures: strings, vectors, and maps
  • Understanding Rust’s types: primitives, structs, enums, and aliases
  • Applying Rust’s core types effectively
  • Converting between data types
  • Demonstrating how Rust’s primitive types map to external libraries

Up to this point in the book, we haven’t spent much time talking about the Rust language itself. In the previous two chapters, we discussed tooling. With that out of the way, we can start diving into the Rust language and its features, which we’ll focus on for the rest of this book. In this chapter, we’ll cover the most important part of Rust after its basic syntax: data structures.

When working with Rust, you’ll spend a great deal of time interacting ...

Get Code Like a Pro in Rust now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.