Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
crustc.com
...This implies that there may be an error and we handle that using the unwrap() method or match.For example, let’s see an example code that panic: let my_string = "Zeus".to_string(); let my_int = my_string.parse::<i32>().unwrap();Here, we’re trying to convert a string...
Observations/Thoughts 2024-02-28 ~1 min read
docs.rs
...let types_from_metadata = frame_decode::helpers::type_registry_from_metadata(&metadata).unwrap(); historic_types_for_spec.prepend(types_from_metadata); for ext_hex in extrinsics_hex { let ext_bytes = hex::decode(ext_hex.trim_start_matches("0x")).unwrap(); // Decode the extrinsic, returning information about it: let ext_info = decode...
Crate v0.18.2 2026-11-11
blog.yoshuawuyts.com
...The version I’ve seen which I like the most used type ascription when matching, but that’s hard to implement, and has a bunch of other lang implications as well: match foo(cond) { n: u32 => {}, n: u16 => {} } Though if someone has ideas how to prototype this, it would be...
Observations/Thoughts 2022-02-16 ~11 min read
siciarz.net
...std::io::Read { match *x { Some(_) => {Ok(y)}, None => Err("not happening".into()) } } into this: fn make_it_happen<T, U>(x: &Option<T>, y: U) -> Result<U, String> where T: std::io::Write, U: std::io::Read { match *x { Some(_) => Ok(y), None => Err("not happening".into()), } } rustfmt fixed...
News & Blog Posts 2016-12-06 ~5 min read
blog.servo.org
...cache use origins intead of full URLs jmr0 fixed the event suppression logic for pages that have navigated zakorgy updated some WebBluetooth APIs to match new specification changes New Contributors Arthur Marble Bryan Gilbert Julien Enselme Leonardo Santagada Taryn Hill Tiziana Sellitto Interested in helping build a web browser? Take...
New Crates & Project Updates 2016-09-27 ~1 min read
boats.gitlab.io
...Today, it expands something like this: // This await!(future) // Expands like this loop { match future.poll() { Ok(Async::NotReady) => yield, Ok(Async::Ready(data)) => Ok(data), Err(error) => Err(error), } } Importantly, once you await a future, you can’t do anything with it again. This gives us the leeway to...
News & Blog Posts 2018-02-13 ~5 min read
security.googleblog.com
...match process_response(unsafe { slice::from_raw_parts(dns_response, response_len) }) { Ok(()) => 0, Err(err) => err.into(), } } fn process_response(response: &[u8]) -> Result<()> { let response = hickory_proto::op::Message::from_bytes(response)?; let response = hickory_proto::xfer::DnsResponse::from_message(response)?; for answer in response.answers() { match answer.record...
Rust Walkthroughs 2026-04-15 ~8 min read
slint-ui.com
...This matches the layout produced by a native Qt application much better and fixes the gallery demo with native style: The "Button (checkable)" GroupBox is much wider with this change -- much like a similar UI looks in Qt designer. Janitor work Fix Node tests in the CI (#1435) After commit...
Project/Tooling Updates 2022-08-03 ~1 min read
crates.io
...http_match name: server-smoke-test target: 127.0.0.1:3000 expect: status: 200 text: 'Google' notify_groups: - infra_team Notes cargo requires a rust installation. License ~~ MIT License ~~ Copyright (c) 2020 Kenan Sulayman Permission is hereby granted, free of charge, to any person obtaining a copy of this...
Crate v0.5.0 2022-05-07
adventures.michaelfbryan.com
...We just need to handle the on_key_pressed() event and match on the key that was pressed, returning a Transition::ChangeState if it’s a button we support. // demo/src/modes/idle.rs impl State for Idle { fn on_key_pressed( &mut self, _drawing: &mut dyn Drawing, event_args...
News & Blog Posts 2020-02-11 ~41 min read
doc.rust-lang.org
...iterator, returns an (Optional) String for line in lines.map_while(Result::ok) { println!("{}", line); } } } // The output is wrapped in a Result to allow matching on errors. // Returns an Iterator to the Reader of the lines of the file. fn read_lines<P>(filename: P) -> io::Result<io::Lines<io...
Rust by Example Book 2024-01-01 ~1 min read
iohk.io
...our team, learn more about our projects, and get a real sense of our culture and ways of working.Offer03If it’s a good match, we'll move to offer, complete a background check, and prepare to welcome you through onboarding.From day one, we want you to feel informed...
Rust Jobs 2020-10-07 ~1 min read
docs.rs
...Bumpalo has a matching allocator_api cargo feature to enable implementing Allocator and using Bump with std collections. Note that, as feature(allocator_api) is unstable and only in nightly Rust, Bumpalo's matching allocator_api cargo feature should be considered unstable, and will not follow the semver conventions that...
Crate v3.20.4 2026-11-13
rust-lang-nursery.github.io
...Option<String>, }, } fn main() { let args = NotesArgs::parse(); if args.color { println!("Enabled syntax highlighting"); } match args.command { Commands::New { title, body } => { // Prints: // TITLE: ... // BODY: ... println!( "Creating new note!\nTITLE: {}\n{}", title, if let Some(body) = body { format!("BODY: {}", body) } else { "".into() } ); } Commands::List => println!("Listing available tasks"), Commands::Delete...
The Rust Cookbook Book 2024-01-01 ~2 min read
seanmonstar.com
...back out: match req.headers.get() { Some(&ContentType(Mime(Application, Json, _))) => "it's json!", Some(&ContentType(Mime(top, sub, _))) => "we can handle top and sub", None => "le sad" } Here’s an example that makes sure the format is correct: req.headers.set(Date(time::utc_now())); // ... match req.headers.get...
Blog Posts 2014-12-22 ~5 min read
www.capturedlambda.dev
...Vec<Item> = Vec::new(); customer.fetch_shopping_list(&mut items); for item in items.iter_mut() { match store.fetch_item(item) { Response::Available => { mark_as_available(&mut item); continue; } Response::NotAvailable => continue; // this early return is why we are // splitting looking up the items // and actually loading them into // the...
Observations/Thoughts 2025-04-23 ~19 min read
smallcultfollowing.com
...To a human, this is clearly an ImportDecl; in particular, it matches this production:ImportDecl = "import" Path "." "*" ";" But to the computer, this is not a match at all. The second thing listed after "import" should be a path not an identifier. Now of course there is a rule that lets...
News & Blog Posts 2016-03-07 ~12 min read
blog.eldruin.com
...It seems the measurements match the humidity, rather than the CO2 concentration. I made other measurements with an iAQ-Core-C sensor I got from MOUSER and these did resemble what one would expect. I will publish those here soon.Possibly my CCS811 is simply worn off. If you are...
Project Updates 2020-09-16 ~4 min read
boats.gitlab.io
...Most of my functions with many return paths terminate with a match statement. Technically, these could be reduced to a single return path by just wrapping the whole match in an Ok, but I don’t know anyone who considers that good form, and I certainly don’t. But an...
News & Blog Posts 2020-04-07 ~15 min read
news.ycombinator.com
Hadean | Systems Programmer | London | ONSITE, VISAWe're looking for a brilliant systems-level implementor to join us in London, or potentially remote, who matches ≥6 of the following: • loves C • loves Rust • has a wide array of ambitious self-directed projects • has got their hands dirty writing technically complex systems...
fn work(on: RustProject) -> Money 2017-01-10 ~1 min read
"My take on this is that you cannot use async Rust correctly and fluently without understanding Arc, Mutex, the mutability of variables/references, 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.