Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
tech.stonecharioteer.com
...When the responding IP matches our target, we’ve reached the destination and break out. This needs sudo to run because of the raw ICMP socket. 1 2 3 4 5 6 7 8 9 10 11 $ sudo cargo run 1 <tailscale-ip> 2 <router-ip> 3 <isp-gateway-ip...
Rust Walkthroughs 2026-04-15 ~16 min read
www.ncameron.org
...Changes to rules around temporary lifetimes for if let and the last expression in a block (2024).No need for pattern matching branches for impossible variants (e.g, using ! or Infallible) (1.82).Restrictions on using explicit referencing in patterns with match ergonomics (2024).Standard libraryLazyCell and LazyLock, alternatives to...
Observations/Thoughts 2025-10-29 ~3 min read
adventures.michaelfbryan.com
...Clear) -> Self::Response { self.ticks.clear(); Ack::new() } } We can now add the match arm to our Router’s handle_message() method. // sim/src/router.rs use fps_counter::Clear; impl<'a> MessageHandler for Router<'a> { fn handle_message(&mut self, msg: &Packet) -> Result<Packet, CommsError> { match msg.id() { 1...
News & Blog Posts 2019-10-15 ~9 min read
blog.sheerluck.dev
...The router receives the request and efficiently matches the request path against the registered routes. The pattern /{code} matches /abc12345, captures the path segment, verifies the HTTP method is GET, and selects the redirect handler. Handler extraction: Before calling redirect, Axum runs the extractors. State<AppState> clones the Arc (cheap...
Rust Walkthroughs 2026-07-08 ~20 min read
code.visualstudio.com
...implicit declaration of function ‘prinft’ [-Wimplicit-function-declaration] "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$", // The first match group matches the file name which is relative. "file": 1, // The second match group matches the line on which the problem occurred. "line": 2, // The third match group matches the column at...
News & Blog Posts 2017-04-11 ~21 min read
blog.sylver.dev Archived: primary link replaced with an archive on 2026-11-12T10:06:43.848Z (UTC; replacement date, not snapshot date)
...0, } } pub fn next_record(&mut self) -> Option<anyhow::Result<Cursor>> { let page = match self.pager.read_page(self.page) { Ok(page) => page, Err(e) => return Some(Err(e)), }; match page { Page::TableLeaf(leaf) => { let cell = leaf.cells.get(self.cell)?; let header = match parse_record_header(&cell.payload) { Ok...
Rust Walkthroughs 2024-07-24 ~13 min read
siciarz.net
...ReplyEntry) { println!("lookup(parent={}, name={})", parent, name.display()); let inode = match self.inodes.get(name.as_str().unwrap()) { Some(inode) => inode, None => { reply.error(ENOENT); return; }, }; match self.attrs.get(inode) { Some(attr) => { let ttl = Timespec::new(1, 0); reply.entry(&ttl, attr, 0); }, None => reply.error(ENOENT), }; } This method...
24 Days of Rust continues! 2014-12-22 ~4 min read
rustacean-station.org
...16:09 - matches! Macro documentation Jon proposes assert_matches 18:13 - Error::description deprecation RFC Soft deprecation in 1.27 failure thiserror anyhow eyre Jane expermenting with track_caller in eyre 24:23 - Other changes in 1.42 Documentation improvements to cargo 26:47 - Rust 1.43 27:17 - item...
News & Blog Posts 2020-05-19 ~1 min read
github.com
...When combined with `#[repr(C)]` the size alignment and layout of the struct should match the equivalent struct in C. `#[repr(packed)]` and `#[repr(packed = "1")]` should have identical behavior. Because this lowers the effective alignment of fields in the same way that `#[repr(packed)]` does (which caused [issue #27060...
RFC 1399 RFC 2015-12-06 ~3 min read
epage.github.io
...Spawn Failed Assertion Failed Status (success / failure) Failed Exit Code Failed Output Strings matched when shouldn't Strings matched when should Bytes matched when shouldn't Bytes matched when should Sub-strings matched when shouldn't Sub-strings matched when should Byte subset matched when shouldn't Byte subset matched...
News & Blog Posts 2018-03-13 ~10 min read
blog.thomasheartman.com
...nested OR-patterns and trait aliases.Nested OR-patternsThis was mentioned as an upcoming feature in the post Recent and future pattern matching improvements from the Inside Rust Blog in March. In short, it allows you to nest patterns when pattern matching.Imagine you have an Option<u8> and you...
Call for Blog Posts 2020-09-30 ~4 min read
blog.jonaylor.xyz Archived: primary link replaced with an archive on 2026-09-12T11:31:20.769Z (UTC; replacement date, not snapshot date)
...Lazy<RegexSet> = Lazy::new(|| { RegexSet::new(RULES.iter().map(|&(_, regex)| regex)) .expect("All regexes should be valid") }); let matches = REGEX_SET.matches(blob); if !matches.matched_any() { return None; } Some(matches.iter().map(|i| RULES[i].0).collect()) } And with the find_secrets() function done, we can go ahead and...
Rust Walkthroughs 2021-11-10 ~9 min read
rust-lang.github.io
...let x = (0, 2); match x { (0, ref y) | (ref y, 0) => { /* use y */} _ => () } Alternatively, split the pattern: let x = (0, 2); match x { (y, 0) => { /* use y */ } (0, ref y) => { /* use y */} _ => () } "##, Drawbacks This will make contributing slightly more complex, as there are rules to follow, whereas right now...
RFC 1567 RFC 2016-01-04 ~3 min read
quickwit.io
...All documents matching this query must also match the query tenant_id=57. Quickwit will only search into the splits with 57 within their tenant_id values.Finally, we entirely revamped our indexing pipeline.By default, it now emits splits every sixty seconds. The pipeline also transparently takes care of...
Project/Tooling Updates 2022-01-19 ~6 min read
joelmccracken.github.io
2
...use std::fs::File; fn log_something(filename, string) { let mut f = try!(File::create(filename)); try!(f.write_all(string)); } fn main() { match log_something("log.txt", "ITS ALIVE!!!") { Ok(..) => println!("File created!"), Err(..) => println!("Error: could not create file.") } } => $ cargo run Compiling simple-log v0.1.0 (file...
Notable Links 2015-06-07 ~6 min read
aloso.github.io
...impl<It> Node<It> { fn traverse(&self) { match self { Node::Leaf(_) => {} Node::Children(children) => { for node in children { node.traverse(); } } } }} If we want to do something with each item, we can pass a closure to the function: impl<It> Node<It> { fn traverse(&self, f: impl Fn(&It)) { match self...
Rust Walkthroughs 2021-03-10 ~7 min read
www.goldsborough.me
...Below is the code for the match arm handling GET requests. It’s slightly more logic than before: (&Get, "/") => { let time_range = match request.query() { Some(query) => parse_query(query), None => Ok(TimeRange { before: None, after: None, }), }; let response = match time_range { Ok(time_range) => make_get_response(query_db...
News & Blog Posts 2018-03-06 ~23 min read
pksunkara.com
...Rails match 'orgs', to: 'orgs#create', via: [:post, :put] Django path('orgs', views.orgs.create),@require_http_methods(["POST", "PUT"]) def create(request): pass Laravel <?php Route::match(['post', 'put'], 'orgs', 'OrgsController@create'); Actix app.service( resource("orgs") .route(post().to(orgs::create)) .route(put().to(orgs::create)) ); Cons This...
News & Blog Posts 2020-05-19 ~8 min read
codeberg.org
...embedding arguments inside a translation pattern matching on arguments plurals (both cardinal and ordinal) translations not stored on the file system numeric arguments guaranteed to be within a range exhaustive pattern matching, if your match expression covers all cases then it doesn't need a wildcard (default) arm currently not...
Crate of the Week 2026-10-07 ~4 min read
dev.to
...fn normalize_next_url(next: &str, base: &str) -> String { let path_and_query = match next.find("://") { Some(scheme_end) => { let after_scheme = &next[scheme_end + 3..]; match after_scheme.find('/') { Some(path_start) => &after_scheme[path_start..], None => "/", } } None => next, }; format!("{}{}", base, path_and_query) } Enter fullscreen mode Exit fullscreen...
Rust Walkthroughs 2026-07-22 ~3 min read
"The biggest failure in Rust‘s communication strategy has been the inability to explain to non-experts that unsafe abstractions are the point, not a ..."

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.