Rust Standard Library Cookbook
上QQ阅读APP看书,第一时间看更新

What this book covers

Chapter 1, Learning the Basics, builds a strong foundation of fundamental principles and techniques that are useful in all kinds of situations. It will also show you how to accept user input on the command line so that you can write, all the coming chapters in an interactive way if you wanted to.

Chapter 2, Working with Collections, gives you a comprehensive overview of all the major data collections in Rust, which includes illustrations of how data is stored in your RAM so that you're ready to choose the right collection for the right task.

Chapter 3, Handling Files and the Filesystem, shows you how to connect your existing tools with the filesystem, allowing you to store, read, and search files on your computer. We will also learn how to compress data in order to send it efficiently over the internet.

Chapter 4, Serialization, introduces you to today's most common data formats and how to (de)serialize them in Rust, enabling you to connect your programs to many services by communicating across tools.

Chapter 5, Advanced Data Structures, builds a foundation for the chapters to come by providing useful information about general modules and Rust's smart pointers. You will also learn how to generate code for annotated structures at compile time by using custom #[derive()] statements.

Chapter 6, Handling Errors, teaches you about Rust's error-handling concept and how to interact seamlessly with it by creating custom errors and loggers for your use case. We will also look at how to design structures in a way that cleans up a user's resources without them noticing.

Chapter 7, Parallelism and Rayon, brings you to the world of multithreading and proves to you that Rust really gives you fearless concurrency. You will learn how to effortlessly adapt your algorithms in order to use the full power of your CPU.

Chapter 8, Working with Futures, introduces you to asynchronous concepts for your program and prepares you for all libraries that work with futures, which are Rust's version of tasks that can run in the background of your program.

Chapter 9, Networking, helps connect you to the internet by teaching you how to set up low-level servers, respond to requests in different protocols, and communicate with the World Wide Web.

Chapter 10, Using Experimental Nightly Features, ensures that you stay ahead in your knowledge of Rust. It will show you tomorrow's way of programming by giving you a tour of the most anticipated features that are still considered unstable.