Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
docs.rs
...If the output matches, the test passes, and if the output doesn't match the test fails. Note that it is also considered a failure if a test actually compiles successfully. To add a test: Create ui-tests/my-awesome-test.rs Write an invalid #[wasm_bindgen] invocation, testing the...
Crate v0.2.127 2026-08-08
crates.io
...ExampleError) -> Self { solana_program_error::ProgramError::Custom(e as u32) } } impl solana_program_error::ToStr for ExampleError { fn to_str<E>(&self) -> &'static str { match self { ExampleError::MintHasNoMintAuthority => "Mint has no mint authority", ExampleError::IncorrectMintAuthority => "Incorrect mint authority has signed the instruction", } } }
Crate v0.8.0 2025-08-11
crates.io
...Structured like an if-else chain, the first matching branch is the item that gets emitted. cfg-if Documentation A macro to ergonomically define an item depending on a large number of #[cfg] parameters. Structured like an if-else chain, the first matching branch is the item that gets emitted...
Crate v1.0.4 2025-10-15
docs.rs
...use number_prefix::NumberPrefix; let amount = 8542_f32; let result = match NumberPrefix::decimal(amount) { NumberPrefix::Standalone(bytes) => { format!("The file is {} bytes in size", bytes) } NumberPrefix::Prefixed(prefix, n) => { format!("The file is {:.1} {}B in size", n, prefix) } }; assert_eq!("The file is 8.5 kB in size", result...
Crate v0.4.0 2020-04-07
crates.io
...To be compatible, Zebra had to implement a special library, ed25519-zebra , to provide Zcash-flavored Ed25519, attempting to match libsodium 1.0.15 exactly. And the initial attempt to implement ed25519-zebra was also incompatible, because it precisely matched the wrong compile-time configuration of libsodium. This problem is...
Crate v2.1.0 2023-01-23
docs.rs
...will be matched from the global root (prefix matches). All other paths will be matched as suffix matches. (=<boolean>) : Boolean values may be specified after a parameter, but if not, the value is assumed to be true by virtue of having listed the parameter. Usage with buf When used with...
Crate v0.5.0 2025-11-30
crates.io
...type JsonArray = Vec<Box<Value>>; type JsonObject = HashMap<String,Box<Value>>; #[derive(Debug, Clone, PartialEq)] pub enum Value { Str(String), Num(f64), Bool(bool), Arr(JsonArray), Obj(JsonObject), Null } fn scan_json(scan: &mut Scanner) -> Result<Value,ScanError> { use Value::*; match scan.get() { Token::Str(s) => Ok(Str(s)), Token...
Crate v0.2.0 2026-07-25
docs.rs
...It may need to match request headers specified in Vary . Even a matching fresh response may still not be usable if the new request restricted cacheability, etc. The key method is before_request(new_request) , which checks whether the new_request is compatible with the original request and whether all...
Crate v3.0.0 2026-02-04
docs.rs
...will be matched from the global root (prefix matches). All other paths will be matched as suffix matches. (=<boolean>) : Boolean values may be specified after a parameter, but if not, the value is assumed to be true by virtue of having listed the parameter. Usage with protoc and protoc-gen...
Crate v0.5.0 2025-11-30
crates.io
...In a regexp without the 'u' flag, these surrogate pairs are matched as distinct characters: const s = "😀"; const re = /./; const m = s.match(re); console.log(m); // returns \uD83D, high surrogate This behavior is almost never desired but is required by the ES spec. It's also super-awkward to...
Crate v0.11.1 2026-03-29
docs.rs
...Hamming Levenshtein - distance & normalized Optimal string alignment Damerau-Levenshtein - distance & normalized Jaro and Jaro-Winkler Sørensen-Dice The normalized versions return values between 0.0 and 1.0 , where 1.0 means an exact match. There are also generic versions of the functions for non-string inputs. Installation strsim is...
Crate v0.11.1 2024-04-02
github.com
A cross-platform font loading library font-kit font-kit provides a common interface to the various system font libraries and provides services such as finding fonts on the system, performing nearest-font matching, and rasterizing glyphs. Synopsis let font = SystemSource::new() .select_by_postscript_name("ArialMT") .unwrap() .load() .unwrap...
Crate v0.14.3 2025-05-26
docs.rs
Rust library for approximate string matching Stringmetrics This is a Rust library for approximate string matching that implements simple algorithms such has Hamming distance, Levenshtein distance, Jaccard similarity, and more. Here are some useful quick links: Crate info: https://crates.io/crates/stringmetrics Crate docs: https://docs.rs/stringmetrics/ Python...
Crate v2.2.2 2022-12-28
docs.rs
Procedural macro for html5ever.
Crate v0.35.0 2025-07-02
crates.io
...LanguageTag = "en-x-twain".parse().unwrap(); assert_eq!(langtag.primary_language(), "en"); assert_eq!(Vec::from_iter(langtag.private_use_subtags()), vec!["twain"]); You can check for equality, but more often you should test if two tags match. In this example we check if the resource in German language is...
Crate v0.3.2 2021-05-24
docs.rs
...u32) -> u32 { match n { 0 | 1 => 1, _ => fib(n-1).await + fib(n-2).await } } The compiler helpfully tells us that: error[E0733]: recursion in an `async fn` requires boxing --> src/main.rs:1:26 | 1 | async fn fib(n : u32) -> u32 { | ^^^ recursive `async fn` | = note: a recursive `async fn...
Crate v1.1.1 2024-04-25
docs.rs
...assert_eq!(queue.pop(), None); // There are Entry API if you want to avoid double hash lookups match queue.entry("Entry"){ Entry::Vacant(entry)=>entry.set_priority(10), Entry::Occupied(_)=>unreachable!(), }; match queue.entry("Entry"){ Entry::Vacant(_)=>unreachable!(), Entry::Occupied(entry)=>{ assert_eq!(entry.get_key(), &"Entry"); assert_eq!(entry...
Crate v0.4.2 2023-11-15
github.com
...examples/matching.rs includes matching.go by Stefan Nilsson, licensed under Creative Commons Attribution 3.0 Unported License. tests/mpsc.rs includes modifications of code from The Rust Programming Language, licensed under the MIT License and the Apache License, Version 2.0. tests/golang.rs is based on code from...
Crate v0.5.16 2026-07-06
crates.io
...How to get a compatible version of protoc The protoc binary that you use to generate code needs to have a version that exactly matches the version of the protobuf crate you are using. More specifically, if you are using Rust protobuf x.y.z then you need to use...
Crate v4.36.0-rc.2 2026-08-03
crates.io
A crate of the gitoxide project dealing with pattern matching
Crate v0.27.0 2026-07-23
"once you can walk barefoot (C), it’s easy to learn to walk with shoes (go) but it will take time to learn to ride a bike (rust)"

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.