Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
crates.io
...causes the build to fail if a version of LLVM exactly matching the current crate version is not found. If enabled, linking crate version 150.1.0 against LLVM 16.0 (for example) would fail whereas it is normally permitted. This may be useful if there is known to be...
Crate v221.1.2 2026-10-30
crates.io
...Boundary.match will return true if a set of graphemes matches the boundary condition Boundary methods for start and len describe how enum variants consume letters when matched Pattern is reverted back to being an enum, but with a Custom variant that allowed you to pass your own fn (&[&str...
Crate v0.12.0 2026-08-27
crates.io
...worker::Context) -> Result<Response> { console_log!( "{} {}, located at: {:?}, within: {}", req.method().to_string(), req.path(), req.cf().unwrap().coordinates().unwrap_or_default(), req.cf().unwrap().region().unwrap_or("unknown region".into()) ); if !matches!(req.method(), Method::Post) { return Response::error("Method Not Allowed", 405); } if let Some(file) = req.form...
Crate v0.9.0 2026-11-11
crates.io
...In these cases, we have done our best to add the new functionality in a way that matched the style of standard HTTP usage. The current version of the Amazon S3 API is 2006-03-01. Amazon S3 supports the REST API. Getting Started Examples are available for many services...
Crate v1.162.0 2026-11-25
crates.io
...Example fn main() { match enable_ansi_support::enable_ansi_support() { Ok(()) => { // ANSI escape codes were successfully enabled, or this is a non-Windows platform. // Use your terminal color library of choice here. println!("\x1b[31mHello, world\x1b[0m"); } Err(_) => { // The operation was unsuccessful, typically because it's running on an...
Crate v0.3.1 2026-04-14
github.com
...Note that N is just a reasonable guess and is not guaranteed to match the actual cache line length of the machine the program is running on. The size of CachePadded<T> is the smallest multiple of N bytes large enough to accommodate a value of type T . The alignment...
Crate v1.3.0 2023-05-12
docs.rs
...Example use quote::quote; use syn::Ident; use proc_macro2::Span; use proc_macro_crate::{crate_name, FoundCrate}; fn import_my_crate() { let found_crate = crate_name("my-crate").expect("my-crate is present in `Cargo.toml`"); match found_crate { FoundCrate::Itself => quote!( crate::Something ), FoundCrate::Name(name) => { let ident...
Crate v3.5.0 2026-03-04
docs.rs
...u32 = from_value(Value::UInt(65536)); assert_eq!(via_test_protocol, via_bin_protocol); let unknown_val = // ... // Maybe it is a float? let unknown_val = match from_value_opt::<f64>(unknown_val) { Ok(float) => { println!("A float value: {}", float); return Ok(()); } Err(FromValueError(unknown_val)) => unknown_val, }; // Or a string...
Crate v28.0.0 2026-03-17
mattforni.github.io
...extern crate args; extern crate getopts; use getopts::Occur; use std::process::exit; use args::{Args,ArgsError}; use args::validations::{Order,OrderValidation}; const PROGRAM_DESC: &'static str = "Run this program"; const PROGRAM_NAME: &'static str = "program"; fn main() { match parse(&vec!("-i", "5")) { Ok(_) => println!("Successfully parsed args"), Err(error...
Crate v2.2.0 2018-02-27
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
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
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
docs.rs
...On BSD distributions, versioned instances of libclang.so matching the pattern libclang.so.* (e.g., libclang.so.7.0 ) are also included. Note: On Linux distributions when the runtime features is enabled, versioned instances of libclang.so matching the pattern libclang.so.* (e.g., libclang.so.1 ) are also included...
Crate v1.9.1 2026-07-29
github.com
...We employ zbus-lockstep to match types against those defined in the AT-SPI2 protocol descriptions. Not all types can be validated (easily) with zbus_lockstep because types may not exist in the protocol descriptions, for example because they are deprecated (but still in use) or we have chosen a...
Crate v0.30.0 2026-05-06
crates.io
...To target wasm32-wasip1 (where reqwest does not compile) or otherwise supply your own HTTP client, build against the matching *-base feature instead: cargo build -p object_store --no-default-features --features aws-base --target wasm32-wasip1 See Disabling reqwest in the crate docs for full details. Related Apache Crates...
Crate v0.14.2 2026-09-15
docs.rs
...usize, field: &'a str, matched_field: bool, extracted: Option<i32>, } impl<'a, 'sval> sval::Stream<'sval> for Extract<'a> { // Rust structs that derive `Value`, like `MyRecord` from earlier, are records in `sval`'s data model. // Each field of the record starts with a call to `record_value_begin` with its...
Crate v2.22.0 2026-08-31
docs.rs
...On Unix platforms, this crate now uses libc, so that the implementation matches what's in std. Users wishing to use the rustix-based implementation can use the rustix-is-terminal crate instead. is-terminal is a simple utility that answers one question: Is this a terminal? A "terminal", also...
Crate v0.4.17 2025-10-23
docs.rs
...let (result, nin, _) = rdr.read_field(bytes, &mut [0; 1024]); bytes = &bytes[nin..]; match result { ReadFieldResult::InputEmpty => {}, ReadFieldResult::OutputFull => panic!("field too large"), ReadFieldResult::Field { record_end } => { count_fields += 1; if record_end { count_records += 1; } } ReadFieldResult::End => break, } } assert_eq!(3, count_records); assert_eq!(9, count_fields); Example...
Crate v0.1.13 2025-10-17
docs.rs
...RequestContext<RoleServer>, ) -> Result<CompleteResult, McpError> { let values = match &request.r#ref { Reference::Prompt(prompt_ref) if prompt_ref.name == "sql_query" => { match request.argument.name.as_str() { "operation" => vec!["SELECT", "INSERT", "UPDATE", "DELETE"], "table" => vec!["users", "orders", "products"], "columns" => { // Adapt suggestions based on previously filled arguments if let Some(ctx...
Crate v3.11.0 2026-11-17
docs.rs
...RequestContext<RoleServer>, ) -> Result<CompleteResult, McpError> { let values = match &request.r#ref { Reference::Prompt(prompt_ref) if prompt_ref.name == "sql_query" => { match request.argument.name.as_str() { "operation" => vec!["SELECT", "INSERT", "UPDATE", "DELETE"], "table" => vec!["users", "orders", "products"], "columns" => { // Adapt suggestions based on previously filled arguments if let Some(ctx...
Crate v3.11.0 2026-11-17
"It's amazing how far const eval has come in #Rust. It wasn't too long ago that even a simple if/else wasn't permitted. Now we're not that far off from..."

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.