Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
llogiq.github.io
...Gankra asked nicely, so here’s a table with the results: # matches LInt name Comment 167 str_to_string very common elsewhere 102 needless_lifetimes probably old code 71 needless_return quite common elsewhere 32 approx_constant false positives 23 mut_mut may be false positives 19 float_cmp may...
From the Blogosphere 2015-09-07 ~5 min read
rustacean-station.org
...hello@rustacean-station.org Timestamps & referenced resources 03:05 - RPIT lifetime capture rules 08:00 - let chains in if and while if let temporary scope Mara’s post on “super let” Tail expression temporary scope 19:15 - Match ergonomics reservations 24:49 - Unsafe extern blocks 29:15 - Unsafe attributes 32...
Observations/Thoughts 2026-02-04 ~1 min read
blog.logrocket.com
...Wiremock mocks HTTP responses using request matching and response templating techniques. Request matching checks if the incoming request meets specified conditions. You specify these conditions in the handler. Response templating helps to generate the content of the API response. Here’s an example of mocking with Wiremock: #[cfg(test)] mod...
Rust Walkthroughs 2023-05-24 ~16 min read
noahkawaguchi.com
...handshake_completing_ack.ack_num, }), } ); use std::assert_matches; assert_matches!(ConnState::new().buggy_establish(handshake_completing_ack), Err(_)); println!("Assertions passed!"); } This was another step in the right direction, but it still had some inconveniences and holes. Callers would match on the TCP state, find it to be TcpState...
Rust Walkthroughs 2026-11-18 ~30 min read
lwn.net
...Currently, it is possible to use pattern matching on a value behind a reference, but not on a value behind a smart pointer — at least without dereferencing the pointer and reborrowing the value behind it. The details exposed by BorrowPlace would be enough to let the compiler safely implement those...
Observations/Thoughts 2026-10-07 ~8 min read
udoprog.github.io
...I hope this makes it apparent why a byte-order naive application can’t process archives correctly unless the byte order used in the archive matches the native byte order. In order to interpret the values correctly we somehow need extra information and careful processing. The dictionary I built this...
Observations/Thoughts 2023-11-01 ~13 min read
rustc-dev-guide.rust-lang.org
...match arms were matching in the wrong order". These comments are very useful to others later on when your test breaks, since they often can highlight what the problem is. They are also useful if for some reason the tests need to be refactored, since they let others know which...
Guide to Rustc Development Book 2024-01-01 ~6 min read
llogiq.github.io
...The point is that the match follows some simple rules, and we can embed stuff from the match in the expression. We take a list of comma separated expressions (spaces don’t count), and take the first and the rest separately; the $(..),* in the match means zero or more comma...
News & Blog Posts 2016-05-02 ~13 min read
doc.rust-lang.org
...i32 = match p { Point(x, _) => x }; A unit-like struct is a struct without any fields, defined by leaving off the list of fields entirely. Such a struct implicitly defines a constant of its type with the same name. For example: struct Cookie; let c = [Cookie, Cookie {}, Cookie, Cookie {}]; is...
The Rust Reference Book 2024-01-01 ~1 min read
andreaskroepelin.de
...PlayerClass } impl PlayerClass { fn homestar(&self) -> String { use PlayerClass::*; match self { Sol(_) => String::from("sun"), ... } } fn greet(&self, other: &PlayerClass) { use PlayerClass::*; match (self, other) { (Cent(_), Pol(_)) => println!("Hello, fellow three-star-systemer!"), ... }; } } This indeed solves all our previous problems and is hence the go-to pattern for this situation...
Observations/Thoughts 2020-09-04 ~6 min read
www.ralfj.de
...A Uniq item matches a Uniq tag with the same ID. A Shr item matches any Shr tag (with or without timestamp). When we are reading, a Shr item matches a Uniq tag. If we pop the entire stack without finding a match, then we have undefined behavior. To understand...
News & Blog Posts 2018-11-20 ~36 min read
sdleffler.github.io
...Smallfuck programs are strings of five instructions: < | Pointer decrement > | Pointer increment * | Flip current bit [ | If current bit is 0, jump past the matching ]; else, go to the next instruction ] | Jump back to the matching [ instruction This gives you the ability to select cells and make loops. Here’s a simple...
News & Blog Posts 2017-03-14 ~30 min read
zellij.dev
...BTreeSet<{KeyModifier::Ctrl, KeyModifier::Shift}> } RustThe KeyWithModifier struct provides us with useful methods so that we can match against it in a readable way. Let’s look at our update function now:impl ZellijPlugin for State { // ... fn update(&mut self, event: Event) -> bool { let mut should_render = false; match event...
Rust Walkthroughs 2024-12-04 ~22 min read
rocket.rs
...The attribute describes the requests that match the route. The attribute is placed on top of a function that is the request handler for that route. As an example, consider the simple route below: 1 2 3 4#[get("/")] fn index() -> &'static str { "Hello, world!" } This index route matches any...
Crate of the Week 2023-11-22 ~6 min read
arxiv.org
...This work investigates aforementioned features, in particular pattern matching, providing a consistent view on how to apply MC/DC to Rust. Hence, this paper informs the implementation of Rust MC/DC tools, paving the road towards Rust in high-assurance applications. Comments: 19 pages, 1 figure, 9 listings Subjects: Software...
Research 2024-09-18 ~1 min read
www.mattkennedy.io
...Enum methods require an implementation for each of the variants, which is done using pattern matching. enum Shape { Rectangle { width: f64, height: f64 }, Circle { radius: f64 }, RightAngleTriangle { base: f64, height: f64 }, } impl Shape { fn area(&self) -> f64 { match self { Shape::Rectangle { width, height } => width * height, Shape::Circle { radius } => std::f64...
Observations/Thoughts 2020-12-16 ~6 min read
blog.dureuill.net
...HashMap<Input, RequestStatus>, } impl Parser { pub fn new() -> Self { let (command_sender, command_receiver) = channel::<Command>(); let (response_sender, response_receiver) = channel::<(Input, Response)>(); std::thread::spawn(move || loop { match command_receiver.recv() { Ok(Command::Input(input)) => { let response = parse(input); let _ = response_sender.send((input, response)); } Ok(Command::Exit...
Observations/Thoughts 2024-02-14 ~6 min read
blog.categulario.tk
...Enums y pattern matching. Aunque en el punto anterior mencioné los tipos unión este punto me parece tan importante que necesita su propio inciso. Es muy común cuando escribes código que estás ante la necesidad de representar información que viene en una de varias formas posibles. Hay formas muy tristes...
Observations/Thoughts 2020-08-11 ~6 min read
blog.servo.org
...mrobinson corrected the behaviour of the scrollBy API to better match the specification. jdm removed incorrect buffer padding in ipc-channel on macOS. kvark fixed an assertion failure when rendering fonts on unix. aneeshusa implemented per-repository labelling actions in highfive. nox refactored the implementation of CSS position values to...
News & Blog Posts 2017-05-16 ~1 min read
dev.to
...Your First Service Next, let's open up the service.toml file for todo-service. [service] name = "my-service" [api] name = "my-service-api" [api.functions.my-function] name = "my-function" handler_name = "handler" Enter fullscreen mode Exit fullscreen mode Start by editing the names to match the ones we...
Learn Rust 2020-10-28 ~11 min read
"… the experience I had in 2019 was dramatically better than the first time I touched the language. After a month I’m feeling very comfortable, and..."

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.