Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
doc.rust-lang.org
All the Places Patterns Can Be Used Patterns pop up in a number of places in Rust, and you’ve been using them a lot without realizing it! This section discusses all the places where patterns are valid. match Arms As discussed in Chapter 6,...
The Rust Programming Language Book 2024-02-01 ~7 min read
doc.rust-lang.org
Patterns and Matching Patterns are a special syntax in Rust for matching against the structure of types, both complex and simple. Using patterns in conjunction with match expressions and other constructs gives you more control over a progra...
The Rust Programming Language Book 2024-02-01 ~1 min read
doc.rust-lang.org
Implementing an Object-Oriented Design Pattern The state pattern is an object-oriented design pattern. The crux of the pattern is that we define a set of states a value can have internally. The states are represented by a set of state objec...
The Rust Programming Language Book 2024-02-01 ~19 min read
doc.rust-lang.org
Using Trait Objects to Abstract over Shared Behavior In Chapter 8, we mentioned that one limitation of vectors is that they can store elements of only one type. We created a workaround in Listing 8-9 where we defined a SpreadsheetCell enum...
The Rust Programming Language Book 2024-02-01 ~8 min read
doc.rust-lang.org
Characteristics of Object-Oriented Languages There is no consensus in the programming community about what features a language must have to be considered object oriented. Rust is influenced by many programming paradigms, including OOP; for...
The Rust Programming Language Book 2024-02-01 ~5 min read
doc.rust-lang.org
Object-Oriented Programming Features Object-oriented programming (OOP) is a way of modeling programs. Objects as a programmatic concept were introduced in the programming language Simula in the 1960s. Those objects influenced Alan Kay’s pro...
The Rust Programming Language Book 2024-02-01 ~1 min read
doc.rust-lang.org
Putting It All Together: Futures, Tasks, and Threads As we saw in Chapter 16, threads provide one approach to concurrency. We’ve seen another approach in this chapter: using async with futures and streams. If you’re wondering when to choose...
The Rust Programming Language Book 2024-02-01 ~4 min read
doc.rust-lang.org
A Closer Look at the Traits for Async Throughout the chapter, we’ve used the Future, Stream, and StreamExt traits in various ways. So far, though, we’ve avoided getting too far into the details of how they work or how they fit together, whi...
The Rust Programming Language Book 2024-02-01 ~17 min read
doc.rust-lang.org
Streams: Futures in Sequence Recall how we used the receiver for our async channel earlier in this chapter in the “Message Passing” section. The async recv method produces a sequence of items over time. This is an instance of a much more ge...
The Rust Programming Language Book 2024-02-01 ~3 min read
doc.rust-lang.org
Yielding Control to the Runtime Recall from the “Our First Async Program” section that at each await point, Rust gives a runtime a chance to pause the task and switch to another one if the future being awaited isn’t ready. The inverse is al...
The Rust Programming Language Book 2024-02-01 ~7 min read
doc.rust-lang.org
Applying Concurrency with Async In this section, we’ll apply async to some of the same concurrency challenges we tackled with threads in Chapter 16. Because we already talked about a lot of the key ideas there, in this section we’ll focus o...
The Rust Programming Language Book 2024-02-01 ~13 min read
doc.rust-lang.org
Futures and the Async Syntax The key elements of asynchronous programming in Rust are futures and Rust’s async and await keywords. A future is a value that may not be ready now but will become ready at some point in the future. (This same c...
The Rust Programming Language Book 2024-02-01 ~14 min read
doc.rust-lang.org
Fundamentals of Asynchronous Programming: Async, Await, Futures, and Streams Many operations we ask the computer to do can take a while to finish. It would be nice if we could do something else while we’re waiting for those long-running pro...
The Rust Programming Language Book 2024-02-01 ~6 min read
doc.rust-lang.org
Extensible Concurrency with Send and Sync Interestingly, almost every concurrency feature we’ve talked about so far in this chapter has been part of the standard library, not the language. Your options for handling concurrency are not limit...
The Rust Programming Language Book 2024-02-01 ~3 min read
doc.rust-lang.org
Shared-State Concurrency Message passing is a fine way to handle concurrency, but it’s not the only way. Another method would be for multiple threads to access the same shared data. Consider this part of the slogan from the Go language docu...
The Rust Programming Language Book 2024-02-01 ~8 min read
doc.rust-lang.org
Transfer Data Between Threads with Message Passing One increasingly popular approach to ensuring safe concurrency is message passing, where threads or actors communicate by sending each other messages containing data. Here’s the idea in a s...
The Rust Programming Language Book 2024-02-01 ~7 min read
doc.rust-lang.org
Using Threads to Run Code Simultaneously In most current operating systems, an executed program’s code is run in a process, and the operating system will manage multiple processes at once. Within a program, you can also have independent par...
The Rust Programming Language Book 2024-02-01 ~8 min read
doc.rust-lang.org
Fearless Concurrency Handling concurrent programming safely and efficiently is another of Rust’s major goals. Concurrent programming, in which different parts of a program execute independently, and parallel programming, in which different...
The Rust Programming Language Book 2024-02-01 ~2 min read
doc.rust-lang.org
Reference Cycles Can Leak Memory Rust’s memory safety guarantees make it difficult, but not impossible, to accidentally create memory that is never cleaned up (known as a memory leak). Preventing memory leaks entirely is not one of Rust’s g...
The Rust Programming Language Book 2024-02-01 ~11 min read
doc.rust-lang.org
RefCell<T> and the Interior Mutability Pattern Interior mutability is a design pattern in Rust that allows you to mutate data even when there are immutable references to that data; normally, this action is disallowed by the borrowing rules....
The Rust Programming Language Book 2024-02-01 ~13 min read
"One thing I like about Rust is that it filters out lazy/sloppy thinkers. Even when I disagree with another Rust programmer, there is a certain level o..."

Search tips

Type anything to search across articles, videos (including conference talks), podcasts, research, crates, and Rust API documentation. These operators give you finer control — click an example to try it.

Find pages containing all your words. Pages where the words appear together rank higher.
Quote part of your query to keep those words together as an exact phrase within a larger search.
Wrap the whole query in quotes for a verbatim search that matches text exactly, punctuation and all — perfect for Rust syntax. Needs at least 3 characters.
Put ! first to open the top result immediately. Quote the whole query for a literal leading bang, as in '!Send'. Bangs elsewhere, such as println!, stay literal. Browser and launcher shortcuts can invoke this directly. See search integrations.
Limit results to a single site. Works on its own () too. One site: per search.

Use the tabs and filters above the results to narrow by content type, publication year, and sort order.