Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
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
arXiv arxiv.org
...Yuga uses a multi-phase analysis approach, starting with a quick pattern-matching algorithm to identify potential buggy components and then conducting a flow and field-sensitive alias analysis to confirm the bugs. We also curate new datasets of lifetime annotation bugs. Yuga successfully detects bugs with good precision on...
Software Engineering Vikram Nitin, Anne Mulhern, Sanjay Arora et al. 2023-10-12 arXiv:2310.08507
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
docs.rs
...foundationdb::Database::default()?; // write a value in a retryable closure match db .run(|trx, _maybe_committed| async move { trx.set(b"hello", b"world"); Ok(()) }) .await { Ok(_) => println!("transaction committed"), Err(_) => eprintln!("cannot commit transaction"), }; // read a value match db .run(|trx, _maybe_committed| async move { Ok(trx.get(b...
Crate v0.11.0 2026-06-24
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
crates.io
...Print image dimensions use jfifdump::{Reader, SegmentKind, JfifError}; use std::fs::File; use std::io::BufReader; fn main() -> Result<(), JfifError> { let file = File::open("some.jpeg")?; let mut reader = Reader::new(BufReader::new(file))?; loop { match reader.next_segment()?.kind { SegmentKind::Eoi => break, SegmentKind::Frame(frame) => { println!("{}x{}", frame.dimension...
Crate v0.6.0 2024-10-05
docs.rs
...Basic selector matching (including child and descendents, classes and element types). Attribute selectors including [foo] and [foo="bar"] nth-child pseudo-class. CSS colors ( color / background-color ) will add Coloured(...) / BgColoured(...) nodes to the render tree. Rules with display: none will cause matching elements to be removed from the render...
Crate v0.17.4 2026-10-18
doc.rust-lang.org
pub struct VaList<'a>
...A VaList can be used across an FFI boundary, and fully matches the platform's va_list in terms of layout and ABI.
struct core Stable since 1.100.0 Version 1.100.0-nightly
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
crates.io
cel
...request.time - resource.age < duration("24h") // Check whether all resource names in a list match a given filter. auth.claims.email_verified && resources.all(r, r.startsWith(auth.claims.email)) Getting Started Add cel to your Cargo.toml : cargo add cel Create and execute a simple CEL expression: use cel...
Crate v0.15.1 2026-11-24
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
doc.rust-lang.org
pub fn accept(&self) -> io::Result<(TcpStream, SocketAddr)>
...Examples use std::net::TcpListener; let listener = TcpListener::bind("127.0.0.1:8080").unwrap(); match listener.accept() { Ok((_socket, addr)) => println!("new client: {addr:?}"), Err(e) => println!("couldn't get client: {e:?}"), }
method std Stable since 1.0.0 Version 1.100.0-nightly
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
docs.rs
...Principle of Operation In general chardetng prefers to do negative matching (rule out possibilities from the set of plausible encodings) than to do positive matching. Since negative matching is insufficient, there is positive matching, too. Except for ISO-2022-JP, pairs of ASCII bytes never contribute to the detection, which...
Crate v1.0.0 2026-03-30
"This is the difference in approaches of the two languages. In C++ if the code is vulnerable, the blame is on the programmer. In Rust if the code is vu..."

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.