Book Image

Rust Standard Library Cookbook

By : Jan Hohenheim, Daniel Durante
Book Image

Rust Standard Library Cookbook

By: Jan Hohenheim, Daniel Durante

Overview of this book

Mozilla’s Rust is gaining much attention with amazing features and a powerful library. This book will take you through varied recipes to teach you how to leverage the Standard library to implement efficient solutions. The book begins with a brief look at the basic modules of the Standard library and collections. From here, the recipes will cover packages that support file/directory handling and interaction through parsing. You will learn about packages related to advanced data structures, error handling, and networking. You will also learn to work with futures and experimental nightly features. The book also covers the most relevant external crates in Rust. By the end of the book, you will be proficient at using the Rust Standard library.
Table of Contents (12 chapters)

There's more...

If you've never worked with a logger before, you might wonder what the difference between certain log levels is. Of course, you can use them for whatever purpose you want, but the following conventions are usual for loggers in many languages:

Log level Usage Example
Error Some major problem occurred that might terminate the program soon. If the application is a service that should always run, a system administrator should immediately be notified. The connection to the database has been broken.
Warn An issue that's not severe or has an automatic workaround has happened. Someone should check this out at some point and fix it. A user's configuration file contains unrecognized options that have been ignored.
Info Some information that might be useful to look at at a later point. This logs normal conditions. The user has started or stopped a process. A default value has been used because no configuration has been provided.
Debug Information that...