Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
www.techofnote.com
...Vec<_> = self .cell_positions() .iter() .map(|pos| self.cell(pos)) .filter_map(|cell| match &cell.symbol { Some(symbol) => match symbol { Symbol::Square(colour) | Symbol::Sun(colour) => Some((colour, &cell.region)), }, None => None, }) .collect(); let square_regions: Vec<_> = self .cell_positions() .iter() .map(|pos| self.cell(pos)) .filter_map(|cell| match...
Rust Walkthroughs 2022-09-07 ~9 min read
insanitybit.github.io
...self.queue_url.clone() }; match self.sqs_client.delete_message_batch(&req) { Ok(res) => { unimplemented!() }, Err(e) => { println!("Failed to deleted {} messages {}", msg_count ,e); } } } } A message for communicating to it: pub enum MessageDeleterMessage { DeleteMessages { receipts: Vec<(String, Instant)>, }, } A ‘route_msg’ function to destructure the message and pass it...
News & Blog Posts 2017-07-18 ~9 min read
passcod.name
...U8) -> U8 {{ match n {{ \u{FFA0}0 => \u{FFA0}1, \u{FFA0}1 => \u{FFA0}1, _ => fibonacci(n - \u{FFA0}1) + fibonacci(n - \u{FFA0}2), }} }} fn factorial(n: U12) -> U12 {{ match n {{ \u{FFA0}\u{FFA0}0 | \u{FFA0}\u{FFA0}1 => \u{FFA0}\u{FFA0}1, _ => factorial(n...
Rust Walkthroughs 2021-10-06 ~18 min read
rust-lang.github.io
...If we consider a program such as ripgrep, where should hypothetical uses of dbg! print to in the case of rg some_word < input_file > matching_lines? Should they end up on the terminal or in the file matching_lines? Clearly the former is correct in this case. Outputting lit...
RFC 2361 RFC 2018-03-13 ~7 min read
andreabergia.com
...pub fn push(&mut self, string: &str) -> Result<(), ClassPathParseError> { /* ... */ } /// Attempts to resolve a class from the various entries. /// Stops at the first entry that has a match or an error. pub fn resolve(&self, class_name: &str) -> Result<Option<Vec<u8>>, ClassLoadingError> { /* ... */ } } The implementation of ClassPath will simply iterate through...
Observations/Thoughts 2023-08-30 ~12 min read
docs.rs
...FromRadix10>(text: &[u8]) -> Option<(&[u8], I)> { match I::from_radix_10(text) { (_, 0) => None, (n, used) => Some((&text[used..], n)), } } This crate has more to offer! Check out the full documentation at docs.rs .
Crate v3.1.1 2026-10-16
www.chriskrycho.com
...Pattern matching and the value of expression blocks. Functions, closures, and an awful lot of Swift syntax. Sum types (enums) and more on pattern matching. Classes and structs (product types), and reference and value types. Hopes for the next generation of systems programming. Properties: type and instance, stored and computed...
News & Blog Posts 2016-03-07 ~3 min read
jrvidal.github.io
...The wildcard pattern _ [...] In this case it acts like a final "catchall" in this match expression. And more... There are many more minor contextual details that I've enjoyed adding (some of them were already mentioned in my previous post): Writing the receiver of a method explicitly: mut self: &Self...
Tooling 2020-12-16 ~3 min read
rust-lang-nursery.github.io
...get_typed_func looks up an export by name and checks that its signature matches the Rust generic parameters — (i32, i32) in, i32 out. Core WebAssembly function parameters are limited to four numeric types: i32, i64, f32, and f64. Strings, structs, and other complex values cannot cross the function boundary...
The Rust Cookbook Book 2024-01-01 ~1 min read
github.com
...The object file is compiled by [this script] https://github.com/bytecodealliance/wit-bindgen/blob/main/ci/rebuild-libwit-bindgen-cabi.sh ) and is verified in repository continuous integration that the checked-in versions match what CI produces.
Crate v0.44.0 2025-12-05
crates.io
...The port is based on the public domain source file from JSR166 as of CVS revision 1.323 , and is jointly licensed under MIT and Apache 2.0 to match the Rust API guidelines . The Java source files are included under the jsr166/ subdirectory for easy reference. The port was...
Crate v0.5.2 2024-11-19
brian-armstrong.github.io
...Next, the noise and other impairments are added, followed by a matched decimation filter and finally demodulation and decoding.Open the signal lab
Project/Tooling Updates 2026-10-14 ~1 min read
doc.rust-lang.org
primitive char
...The gap in valid char values is understood by the compiler, so in the below example the two ranges are understood to cover the whole range of possible char values and there is no error for a non-exhaustive match. let c: char = 'a'; match c { '\0' ..= '\u{D7FF}' => false...
primitive core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
primitive char
...The gap in valid char values is understood by the compiler, so in the below example the two ranges are understood to cover the whole range of possible char values and there is no error for a non-exhaustive match. let c: char = 'a'; match c { '\0' ..= '\u{D7FF}' => false...
primitive std Stable since 1.0.0 Version 1.100.0-nightly
github.com
...cargo make --profile mainnet build Verifying binary hash To verify that a deployed binary matches the source code, you may want to build it reproducibly and then verify that the SHA256 hash matches that of the deployed binary. The motivation behind this is to prevent malicious code from being deployed...
Crate v1.3.0 2026-09-17
rust-analyzer.github.io
#8222 don’t mark unlinked file diagnostic as unused. #8246 (first contribution) update VIM YCM installation instructions. #8250 classify associated types in paths more accurately. #8256 make "Move item" commands work in more cases. #8261 fix expansion of OR-patterns in match check. #8266 fix generic argument lowering in qualified...
Project/Tooling Updates 2021-04-07 ~1 min read
docs.rs
...fn compute_something(input: &foo::FooAtom) -> u32 { match *input { foo_atom!("foo") => 1, foo_atom!("bar") => 2, _ => 3, } }
Crate v0.11.0 2026-08-21
aloso.github.io
...Expr,) -> Option<Value> { match (kind, eval(vars, expr)?) { (UnExprKind::Not, Value::Bool(b)) => { Some(Value::Bool(!b)) } (UnExprKind::Neg, Value::Num(n)) => { Some(Value::Num(-n)) } _ => None, }}fn eval_binary( kind: BinExprKind, vars: &Variables<'_>, lhs: Expr, rhs: Expr,) -> Option<Value> { match kind { BinExprKind::Add => { if let Value::Num(lhs) = eval...
Rust Walkthroughs 2021-04-14 ~10 min read
www.greyblake.com
...impl Drink { fn kind(&self) -> DrinkKind { match self { Drink::TapWater -> DrinkKind::TapWater, Drink::Coffee(..) -> DrinkKind::Coffee, Drink::Tea { .. } -> DrinkKind::Tea } } } And ability to iterate over all variants of DrinkKind: impl DrinkKind { fn all() -> Vec<DrinkKind> { use DrinkKind::*; vec![TapWater, Coffee, Tea] } } The problem with the solution The solution above will...
Rust Walkthroughs 2023-08-09 ~3 min read
lucumr.pocoo.org
...impl Enumerator { fn query_len(&self) -> Option<usize> { Some(match self { Enumerator::Empty => 0, Enumerator::Values(v) => v.len(), Enumerator::Iter(i) => match i.size_hint() { (a, Some(b)) if a == b => a, _ => return None, }, Enumerator::RevIter(i) => match i.size_hint() { (a, Some(b)) if a == b => a, _ => return...
Observations/Thoughts 2024-08-28 ~16 min read
"I think it's worth noting that the fact that this program fails to compile whereas the analogous Python runs but gives the wrong answer is *exactly wh..."

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.