doc.rust-lang.org
Appendix G - How Rust is Made and “Nightly Rust” This appendix is about how Rust is made and how that affects you as a Rust developer. Stability Without Stagnation As a language, Rust cares a lot about the stability of your code. We want Ru...
The Rust Programming Language
Book
2024-02-01
~7 min read
doc.rust-lang.org
Appendix F: Translations of the Book For resources in languages other than English. Most are still in progress; see the Translations label to help or let us know about a new translation! • Português (BR) • Português (PT) • 简体中文: KaiserY/trp...
The Rust Programming Language
Book
2024-02-01
~1 min read
doc.rust-lang.org
Appendix E: Editions In Chapter 1, you saw that cargo new adds a bit of metadata to your Cargo.toml file about an edition. This appendix talks about what that means! The Rust language and compiler have a six-week release cycle, meaning user...
The Rust Programming Language
Book
2024-02-01
~2 min read
doc.rust-lang.org
Appendix D: Useful Development Tools In this appendix, we talk about some useful development tools that the Rust project provides. We’ll look at automatic formatting, quick ways to apply warning fixes, a linter, and integrating with IDEs. A...
The Rust Programming Language
Book
2024-02-01
~3 min read
doc.rust-lang.org
Appendix C: Derivable Traits In various places in the book, we’ve discussed the derive attribute, which you can apply to a struct or enum definition. The derive attribute generates code that will implement a trait with its own default imple...
The Rust Programming Language
Book
2024-02-01
~7 min read
doc.rust-lang.org
Appendix B: Operators and Symbols This appendix contains a glossary of Rust’s syntax, including operators and other symbols that appear by themselves or in the context of paths, generics, trait bounds, macros, attributes, comments, tuples,...
The Rust Programming Language
Book
2024-02-01
~8 min read
doc.rust-lang.org
Appendix A: Keywords The following lists contain keywords that are reserved for current or future use by the Rust language. As such, they cannot be used as identifiers (except as raw identifiers, as we discuss in the “Raw Identifiers” secti...
The Rust Programming Language
Book
2024-02-01
~3 min read
doc.rust-lang.org
Appendix The following sections contain reference material you may find useful in your Rust journey.
The Rust Programming Language
Book
2024-02-01
~1 min read
doc.rust-lang.org
Graceful Shutdown and Cleanup The code in Listing 21-20 is responding to requests asynchronously through the use of a thread pool, as we intended. We get some warnings about the workers, id, and thread fields that we’re not using in a direc...
The Rust Programming Language
Book
2024-02-01
~7 min read
doc.rust-lang.org
From a Single-Threaded to a Multithreaded Server Right now, the server will process each request in turn, meaning it won’t process a second connection until the first connection is finished processing. If the server received more and more r...
The Rust Programming Language
Book
2024-02-01
~23 min read
doc.rust-lang.org
Building a Single-Threaded Web Server We’ll start by getting a single-threaded web server working. Before we begin, let’s look at a quick overview of the protocols involved in building web servers. The details of these protocols are beyond...
The Rust Programming Language
Book
2024-02-01
~15 min read
doc.rust-lang.org
Final Project: Building a Multithreaded Web Server It’s been a long journey, but we’ve reached the end of the book. In this chapter, we’ll build one more project together to demonstrate some of the concepts we covered in the final chapters,...
The Rust Programming Language
Book
2024-02-01
~1 min read
doc.rust-lang.org
Macros We’ve used macros like println! throughout this book, but we haven’t fully explored what a macro is and how it works. The term macro refers to a family of features in Rust—declarative macros with macro_rules! and three kinds of proce...
The Rust Programming Language
Book
2024-02-01
~17 min read
doc.rust-lang.org
Advanced Functions and Closures This section explores some advanced features related to functions and closures, including function pointers and returning closures. Function Pointers We’ve talked about how to pass closures to functions; you...
The Rust Programming Language
Book
2024-02-01
~5 min read
doc.rust-lang.org
Advanced Types The Rust type system has some features that we’ve so far mentioned but haven’t yet discussed. We’ll start by discussing newtypes in general as we examine why they are useful as types. Then, we’ll move on to type aliases, a fe...
The Rust Programming Language
Book
2024-02-01
~9 min read
doc.rust-lang.org
Advanced Traits We first covered traits in the “Defining Shared Behavior with Traits” section in Chapter 10, but we didn’t discuss the more advanced details. Now that you know more about Rust, we can get into the nitty-gritty. Defining Trai...
The Rust Programming Language
Book
2024-02-01
~13 min read
doc.rust-lang.org
Unsafe Rust All the code we’ve discussed so far has had Rust’s memory safety guarantees enforced at compile time. However, Rust has a second language hidden inside it that doesn’t enforce these memory safety guarantees: It’s called unsafe R...
The Rust Programming Language
Book
2024-02-01
~20 min read
doc.rust-lang.org
Advanced Features By now, you’ve learned the most commonly used parts of the Rust programming language. Before we do one more project, in Chapter 21, we’ll look at a few aspects of the language you might run into every once in a while but m...
The Rust Programming Language
Book
2024-02-01
~1 min read
doc.rust-lang.org
Pattern Syntax In this section, we gather all the syntax that is valid in patterns and discuss why and when you might want to use each one. Matching Literals As you saw in Chapter 6, you can match patterns against literals directly. The fol...
The Rust Programming Language
Book
2024-02-01
~19 min read
doc.rust-lang.org
Refutability: Whether a Pattern Might Fail to Match Patterns come in two forms: refutable and irrefutable. Patterns that will match for any possible value passed are irrefutable. An example would be x in the statement let x = 5; because x m...
The Rust Programming Language
Book
2024-02-01
~2 min read