Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
docs.rs
...user_project("magna") .soft_deleted(true) .return_partial_success(false) .projection("amet.") .prefix("takimata") .page_token("amet.") .max_results(81) .doit().await; match result { Err(e) => match e { // The Error enum provides details about what exactly happened. // You can also just use its `Debug`, `Display` or `Error` traits Error::HttpError...
Crate v7.0.0+20251218 2026-01-01
docs.rs
...This functionality is different from OUT_DIR in that the same directory path will be seen by all crates whose build passes a matching suffix argument, and each crate can see content placed into the directory by those other crates' build scripts that have already run. This functionality is similar...
Crate v1.0.9 2025-08-07
docs.rs
...XDR has discriminated unions, which are a good match for Rust enums. However, it also supports a default case if an unknown discriminator is encountered. This crate supports this for unpacking, but not for packing, as Rust does not allow enums to have unknown values. The generated code uses #[derive...
Crate v0.4.4 2017-08-02
crates.io
pid
...assert_eq!(output.output, 55.0); // <-- assert_eq!(output.p, 50.0); assert_eq!(output.i, 5.0); // Add our final derivative term and match our setpoint target pid.d(2.0, 100.0); let output = pid.next_control_output(15.0); // The output will now say to go down...
Crate v4.0.0 2025-03-28
docs.rs
...Check whether a record exists with has_data() Read the matched network with network() Decode the full record with decode() Decode one field with decode_path() Reuse offset() as a cache key when many IPs share the same record Iterating networks Use within() to iterate over the networks contained in...
Crate v0.30.0 2026-07-19
docs.rs
...the MenuEventReceiver which you can use to listen to events when a menu item is activated if let Ok(event) = MenuEvent::receiver().try_recv() { match event.id { _ if event.id == save_item.id() => { println!("Save menu item activated"); }, _ => {} } } Note for winit or tao users: You should use [ MenuEvent::set_event...
Crate v0.19.3 2026-06-17
docs.rs
...TokenStream) -> TokenStream { match actual_implementation(input.into()) { Ok(output) => output, Err(error) => error.into_compile_error(), } .into() } fn actual_implementation(input: TokenStream2) -> syn::Result<TokenStream2> { // .. } Using the #[manyhow] macro To activate the error handling, just add #[manyhow] above any proc macro implementation, reducing the above example to: use manyhow::manyhow...
Crate v0.13.0 2026-08-03
docs.rs
...Use thiserror if you think you need an error type that can be handled via match or reported. This is common in library crates where you don't know how your users will handle your errors. Compatibility with anyhow This crate does its best to be usable as a drop...
Crate v0.6.14 2026-08-11
crates.io
...But since it needs to be a genuine nightly toolchain, we are forced to pick an actual nightly toolchain, only one whose date matches the birth of the corresponding MSRV -stable toolchain. See ./scripts/formatting/rust-toolchain.toml . See also, w.r.t. versions and dates: https://releases.rs To...
Crate v0.2.0-rc1 2026-01-16
enricoch.gitlab.io
...Comparing a string with a list of strings and retrieving only the best matches fn test() { use rust_fuzzy_search::fuzzy_search_best_n; let s = "bulko"; let list : Vec<&str> = vec![ "kolbasobulko", "sandviĉo", "ŝatas", "domo", "emuo", "fabo", "fazano" ]; let n : usize = 3; let res : Vec<(&str, f32)> = fuzzy_search...
Crate v0.1.1 2021-07-14
crates.io
id3
...Box<dyn std::error::Error>> { let temp_file = std::env::temp_dir().join("music.mp3"); copy("testdata/quiet.mp3", &temp_file)?; let mut tag = match Tag::read_from_path(&temp_file) { Ok(tag) => tag, Err(Error{kind: ErrorKind::NoTag, ..}) => Tag::new(), Err(err) => return Err(Box::new(err)), }; tag.set...
Crate v1.17.1 2026-07-29
crates.io
...if absent, compute and insert; if present, return cached let result = cache.entry(&0, None, |_key, val| EntryAction::Retain(*val)); let value = match result { EntryResult::Retained(v) => v, EntryResult::Vacant(guard) => { let v = 42; // expensive computation guard.insert(v).unwrap(); v } _ => unreachable!(), }; assert_eq!(value, 42); // Conditionally remove: evict entries...
Crate v0.7.0 2026-06-27
docs.rs
...it must match the regex ^component-type ). A module is allowed to have any number of custom sections, including zero. Each custom section describes a WIT world . The unit of bindings generation is a world , and each world used during step (1), which may possibly be in multiple separate libraries...
Crate v0.257.1 2026-08-19
docs.rs
...DefaultTerminal) -> Result<()> { loop { terminal.draw(render)?; if matches!(event::read()?, Event::Key(_)) { break Ok(()); } } } fn render(frame: &mut Frame) { frame.render_widget("hello world", frame.area()); } Documentation Docs - the full API documentation for the library on docs.rs. Ratatui Website - explains the library's concepts and provides step-by-step...
Crate v0.30.2 2026-06-19
crates.io
...the </> tag Basically, tags must be closed by giving exactly the same colors/styles as their matching open tag (with a slash / at the beginning), e.g: <blue,bold>...</blue,bold> . But it can be tedious! So, it is also possible to close the last open tag simply with </> : cprintln...
Crate v0.3.7 2024-11-08
crates.io
...the function signature of the override must match the base function. overrides can be specified at any point in the final shader's import tree. multiple overrides can be applied to the same function. for example, given : a module a containing a function f , a module b that imports a...
Crate v0.23.0 2026-07-14
crates.io
...Usage The f16 and bf16 types attempt to match existing Rust floating point type functionality where possible, and provides both conversion operations (such as to/from f32 and f64 ) and basic arithmetic operations. Hardware support for these operations will be used whenever hardware support is available—either through instrinsics or...
Crate v2.7.1 2025-10-14
docs.rs
...let to_find = ["Up!", "Office Space"]; for movie in &to_find { match movie_reviews.get(movie) { Some(review) => println!("{}: {}", movie, review), None => println!("{} is unreviewed.", movie) } } // Look up the value for a key (will panic if the key is not found). println!("Movie review: {}", movie_reviews["Office Space"]); // iterate over...
Crate v0.6.1 2023-10-05
crates.io
...When used in a hash table ZwoHash is almost always able to match the performance of FxHash while outperforming it by quite a bit for some common inputs for which FxHash's output is particularly poor. The hash algorithm used by ZwoHash is very similar to that of FxHash, both...
Crate v0.1.2 2020-09-04
crates.io
...0" When using the experimental ptrhash layout, enable the ptrhash feature on both phf_codegen and the runtime phf dependency so the generated constants match the runtime struct layout. Then put code on build.rs: use std::env; use std::fs::File; use std::io::{BufWriter, Write}; use std::path...
Crate v0.14.0 2026-06-21
"Man, rust crates are so allergic to 1.0 that they'll skip all the way to version 22."

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.
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.