Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
kevinlynagh.com
...The match code is 5 instructions longer than the lookup code — that’d explain things if match were consistently slower than lookup, but that’s not the case — match is only slower in the “mix with rotate” task for 4 and 8 letter alphabets. It’s also worth noting that...
News & Blog Posts 2019-01-29 ~25 min read
blog.spike.codes
...let if_else_regex = Regex::new(r"\{% if (.*?) %\}((.|\n)*?)(\{% else %\}((.|\n)*?)\{% endif %\}|\{% endif %\})").unwrap(); RegEx Breakdown {% if — Match first part of opening tag (.*?) — Match any text lazily %} — Match end part of opening tag ((.|\n)*?) — Match multi-line string of text lazily {% else %} — Match else tag ((.|\n)*?) — Match multi-line string...
Rust Walkthroughs 2022-06-22 ~11 min read
request-for-explanation.github.io
Episode List June 19, 2017 This week we look at RFC 2005 "Match Ergonomics Using Default Binding Modes" MP3 OGG MPEG-4 RFC 1944, the predecessor of #2005 Carol Nichols Alexis Beingessner Manish Goregaokar Transcription courtesy of wirelyre! Thank you! <3 Carol Nichols: Hi everyone. Welcome to the inaugural episode...
News & Blog Posts 2017-06-27 ~14 min read
osa1.net
...previous borrow of `*self` occurs here; the mutable borrow prevents subsequent moves, borrows, or modification of `*self` until the borrow ends <anon>:16 match self.find_thing_mut(name) { ^~~~ <anon>:24:10: 24:10 note: previous borrow ends here <anon>:16 match self.find_thing_mut(name) { ... <anon>:24 } ^ <anon...
News & Blog Posts 2016-04-04 ~7 min read
rust-lang.github.io
...pub trait PartialOrd { fn partial_cmp(&self, other: &Self) -> Option<Ordering>; fn lt(&self, other: &Self) -> bool { match self.partial_cmp(other) { Some(Less) => true, _ => false, } } fn le(&self, other: &Self) -> bool { match self.partial_cmp(other) { Some(Less) | Some(Equal) => true, _ => false, } } fn gt(&self, other: &Self) -> bool { match...
RFC 100 RFC 2014-06-01 ~2 min read
blog.burntsushi.net
...Instead, they have leftmost-longest semantics, where the longest possible match always wins. In this case, | is a commutative operator. Some other regex engines, such as Hyperscan, implement “report all matches” or “earliest match” semantics. In that case, abc|a would match both a and abc in the haystack abc...
Project/Tooling Updates 2023-07-12 ~105 min read
ntietz.com
...The struct tells us where a match is. Our first function finds our longest partial match that's within our digit limit. pub struct Location { pub offset: usize, pub length: usize, } pub fn find_pi_match(msg: &[u8], limit: usize) -> Option<Location> { let mut best_match: Option<Location> = None; let...
Observations/Thoughts 2024-03-20 ~6 min read
hurl.dev
...GET https://sample.org/hello HTTP/1.0 200 [Asserts] jsonpath "$.date" matches "^\\d{4}-\\d{2}-\\d{2}$" jsonpath "$.name" matches "Hello [a-zA-Z]+!" In 1.6.0, we’ve added regex literal for matches: GET https://sample.org/hello HTTP/1.0 200 [Asserts] jsonpath "$.date" matches...
Project/Tooling Updates 2022-02-23 ~1 min read
e003: No. more. nulls.
16:51
New Rustacean newrustacean.com
...Well, in Rust, you would do this with pattern matching. When you pattern match in Rust, you must match exhaustively. That is, you must cover every single case in the space you are matching against. So in the case of our list of three colors, your pattern matching block would...
Podcast 2015-10-21 16:51
rust-lang.github.io
...Matching When an OsStr is used for matching, an unpaired low surrogate at the beginning and unpaired high surrogate at the end must be replaced by regular expressions that match all pre-canonicalization possibilities. For instance, matching for xxxx\u{d9ab} would create the following regex: xxxx( \xed\xa6\xab...
RFC 2295 RFC 2018-01-16 ~13 min read
www.youtube.com
...near constrained now pattern matching which I didn't really think was a thing before I even touched Russ so I'm it's such an amazing concept honestly makes code so much better it allows you to match patterns on values for example matching a literal an enum variant...
Video 2023-08-30
blog.sheerluck.dev
...Match match is Rust's pattern matching construct. It compares a value against a series of patterns and executes the code for the first pattern that matches: let x = 3; match x { 1 => println!("one"), 2 => println!("two"), 3 => println!("three"), 4 => println!("four"), _ => println!("other") } Each line inside the...
Rust Walkthroughs 2026-04-08 ~18 min read
heroiclabs.com
...Any user can participate in matches with other users. Users can create, join, and leave matches with messages sent from clients. A match exists on the server until its last participant has left. Any data sent through a match is immediately routed to all other participants. The matches are kept...
Rust Walkthroughs 2021-04-21 ~19 min read
doc.rust-lang.org
pub fn find<P>(&self, pat: P) -> Option<usize>
str::find — Returns the byte index of the first character of this string slice that matches the pattern. Returns None if the pattern doesn't match. The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches. Examples Simple...
method core Stable since 1.0.0 Version 1.100.0-nightly
docs.rs
Support for matching file paths against Unix shell style patterns. glob Support for matching file paths against Unix shell style patterns. Documentation Usage To use glob , add this to your Cargo.toml : [dependencies] glob = "0.3.2" Examples Print all jpg files in /media/ and all of its subdirectories. use...
Crate v0.3.4 2026-10-08
adventures.michaelfbryan.com
...The error message is telling us that it matched the function signature, then when trying to match the rest of the input (of which there is none) it didn’t have enough tokens. The solution is easy enough, just add a base case which matches exactly nothing. // src/lib.rs...
News & Blog Posts 2020-06-23 ~29 min read
crates.io
...States can defer an event to their superstate by returning the Super outcome. #[state(superstate = "blinking")] fn led_on(event: &Event) -> Outcome<State> { match event { Event::TimerElapsed => Transition(State::led_off()), Event::ButtonPressed => Super } } #[superstate] fn blinking(event: &Event) -> Outcome<State> { match event { Event::ButtonPressed => Transition(State::not_blinking()), _ => Super...
Crate v0.4.0 2025-07-05
crates.io
...States can defer an event to their superstate by returning the Super outcome. #[state(superstate = "blinking")] fn led_on(event: &Event) -> Outcome<State> { match event { Event::TimerElapsed => Transition(State::led_off()), Event::ButtonPressed => Super } } #[superstate] fn blinking(event: &Event) -> Outcome<State> { match event { Event::ButtonPressed => Transition(State::not_blinking()), _ => Super...
Crate v0.4.1 2025-07-05
www.newrustacean.com
...Pattern matching, with a focus on using them with enumerated types and some discussion about how they differ from switch blocks in C-like languages. Using the Option and Result enumerated types with pattern matching to provide meaningful returns from functions safely. §Order There is a specific order to the...
News & Blog Posts 2015-10-26 ~1 min read
www.howtocodeit.com
...The underscores are matched by $skip, and the expression is matched by $e. Let's break this down.Private macro rules in Rust@ {...} isn't some esoteric Rust syntax you haven't seen before. It's not valid Rust at all! It's merely a pattern of tokens, matched by...
Rust Walkthroughs 2024-07-10 ~16 min read
"Rust is funny because in one sense it's hard and clunky. However, it's only ever *precisely as hard and clunky as it needs to be*. Everywhere somethin..."

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.