Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
zelanton.github.io
...The classifier sees the typed error — you can match on the exit code, an Error::Timeout, or the captured stderr. A cancelled run is never retried: the token stays cancelled. CancellationToken (re-exported from tokio-util) is the coordinated shutdown primitive. Wire the same parent token into many jobs via...
Project/Tooling Updates 2026-06-17 ~9 min read
branan.github.io
...u32) -> Fbe { let osc = self.mcg.c2.read().get_bits(4..6); let frdiv = if osc == OscRange::Low as u8 { match divide { 1 => 0, 2 => 1, 4 => 2, 8 => 3, 16 => 4, 32 => 5, 64 => 6, 128 => 7, _ => panic!("Invalid external clock divider: {}", divide) } } else { match divide { 32 => 0, 64...
News & Blog Posts 2017-02-07 ~20 min read
blog.japaric.io
...The app::foo function shown above doesn’t match either format. Now let’s see what cargo-call-stack produces when it uses both signature matching and name matching. This is the rest of the program: struct Bar; // uses the default method implementation impl Foo for Bar {} struct Baz; impl...
News & Blog Posts 2019-03-19 ~44 min read
www.poor.dev
...String) -> RawFd { unimplemented!() } fn main() { let default_shell = std::env::var("SHELL") .expect("could not find default shell from $SHELL"); let stdout_fd = spawn_pty_with_shell(default_shell); let mut read_buffer = vec![]; loop { match read_from_fd(stdout_fd) { Some(mut read_bytes) => { read_buffer.append(&mut read...
Rust Walkthroughs 2021-11-03 ~19 min read
rust-lang.github.io
...for x in it.take(3) { // a *copy* of the iterator is used here // .. } match it.next() { // the original iterator (not advanced) is used here // .. } However, there is considerable demand for Copy range types for multiple reasons: • ergonomic use without needing explicit .clone()s or rewriting the a..b syntax...
RFC 3550 RFC 2023-12-18 ~17 min read
branan.github.io
...Clock) { unsafe { match clock { Clock::PortC => { let mut scgc = core::ptr::read_volatile(&self.scgc5); scgc |= 0x00000800; core::ptr::write_volatile(&mut self.scgc5, scgc); } } } } } The simple match-based clock management we have here would get unwieldy pretty quickly if we intended to use it to manage a large number...
News & Blog Posts 2017-01-17 ~21 min read
smallcultfollowing.com
...The snippet doesn’t include the HIR, but it includes a number of methods like lower_ty that take as input an AST type and produce the HIR type:impl Context { fn lower_ty(&mut self, ty: &ast::Ty) -> hir::Ty { match ty { // ... lots of stuff here // A type like...
Observations/Thoughts 2022-06-22 ~13 min read
gitlab.com
...Command = match it.next()), but nothing prevents you from implementing some additional logic (like transliterating, for instance) there! :) And yes, I don't think it makes sense to transliterate stuff using regular expressions :)
Call for Participation 2020-05-12 ~2 min read
pauljmiller.com
...Adding interactivity Time to move on to the fn event() method! The event() method receives an Event called event that we can match on: fn event(&mut self, event: &Event, _ctx: &mut EventCtx, _data: &mut String, _env: &Env) { match event { Event::MouseDown(mouse) => { dbg!(mouse); }, _ => (), } } If you run the app...
News & Blog Posts 2019-10-29 ~16 min read
www.vectorware.com
...The abstraction is only zero cost when the vector width matches the number of warp lanes. Not every cross-lane operation maps to an efficient warp instruction. Shuffles that match the hardware's supported patterns are cheap, but arbitrary permutations may need several instructions or a trip through shared memory...
Observations/Thoughts 2026-08-12 ~9 min read
ticki.github.io
...If not, we get the non-matching value, which allows us to handle things case-by-case. Searching Searching is painfully obvious: Simply read and follow the appropriate buckets, until you get to a leaf, which is your final destination. It is a match, if the key of the leaf...
News & Blog Posts 2017-05-16 ~10 min read
2017.rustfest.eu
...there has never been a better time to use Rust for your next service, application, or tool! GStreamer & Rust – A perfect match Luis de Bethencourt Luis de Bethencourt is a freedom-loving technocrat, who currently works for Samsung’s Open Source Group in London. He has always enjoyed programming and...
News & Blog Posts 2017-03-28 ~10 min read
pranitha.dev
...We call varmap_loaded.load() to read the file and populate the VarMap with the saved weights and biases The model architecture (here NeuralNetwork::new(2, 2)) needs to match the original saved model exactly. If the architecture doesn't match, the loading will fail because the parameter shapes won...
Observations/Thoughts 2025-11-05 ~24 min read
www.redox-os.org
...macro_rules! t { ... } fn main() -> Result<()> { match unsafe { t!(libc::fork()) } { 0 => child(), pid => Parent::new(pid).run() } } fn child() -> Result<()> { unsafe { // Attach the parent process to debug this child process t!(libc::ptrace(libc::PTRACE_TRACEME, 0 as libc::pid_t, NULL, NULL)); // Pause execution by raising SIGSTOP until...
News & Blog Posts 2019-06-25 ~6 min read
varkor.github.io
...this3: surface! { expr1; bubble! expr2.bind(|a| { expr3; bubble! expr4.bind(|b| { expr5; expr6(a, b); Monad::unit(expr7) }) }) } where bubble! expr desugars to: match expr { ControlFlow::Return(_) => return expr, ControlFlow::Break(Some(_)) => break expr, ControlFlow::Break(None) => break, ControlFlow::Continue => continue, ControlFlow::Value(_) => expr, // We'd also want `Yield...
News & Blog Posts 2018-11-13 ~6 min read
rust-lang.github.io
...In the absence of catch, we would have to suggest the introduction of a match block. Extended error message text. In the extended error message, for those cases where the return type cannot easily be changed, we might consider suggesting that the fallible portion of the code is refactored into...
RFC 1859 RFC 2017-01-19 ~14 min read
serokell.io
...Rust has a very powerful tool in match statements to do this: fn fizzbuzz (number: u32) -> String { match (number % 3, number % 5) { (0, 0) => "fizzbuzz".to_string(), (0, _) => "fizz".to_string(), (_, 0) => "buzz".to_string(), (_, _) => number.to_string() } } Since text in quotes is a string in memory, or str in...
Learn Standard Rust 2020-08-18 ~14 min read
doc.rust-lang.org
...This is mostly relevant to macros. E.g. quote!{ #a#b } is no longer accepted. • It doesn't treat keywords specially, so e.g. match"..." {} is no longer accepted. • Insert whitespace between the identifier and the subsequent #, ", or ' to avoid errors. • Edition migrations will help you insert whitespace in such...
The Rust Edition Guide Book 2024-01-01 ~2 min read
therealprof.github.io
...u1, #[doc = "Bit 3 - Address match interrupt enable (slave only)"] addrie: u1, #[doc = "Bit 4 - Not acknowledge received interrupt enable"] nackie: u1, #[doc = "Bit 5 - STOP detection Interrupt enable"] stopie: u1, #[doc = "Bit 6 - Transfer Complete interrupt enable"] tcie: u1, #[doc = "Bit 7 - Error interrupts enable"] errie: u1, #[doc = "Bits...
Call for Blog Posts 2020-09-23 ~6 min read
amit.prasad.me
...MyTask) { while let Some(request) = task.rx.recv().await { // Process the request match request { Request::Add(a, b) => { let result = a + b; // Send the response back // ...? } } } } // Elsewhere: let (tx, rx) = mpsc::channel::<Request>(); // Assuming we construct MyTask with `rx`, use `tx`: tx.send(Request::Add(a, b)).await; // Send a...
Rust Walkthroughs 2024-11-27 ~17 min read
"<ketralnis\> Rust is also really phobic of heap allocations […] <Xion\> Yes, Rust encourages everyone to be a full stack developer :)"
— [Submit your quotes for next week][submit]!

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.