Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
crates.io
...use swift_rs::{swift, Int, SRObject}; // Any struct that is used in a C function must be annotated // with this, and since our Swift function is exposed as a // C function with @_cdecl, this is necessary here #[repr(C)] // Struct matches the class declaration in Swift struct SquareNumberResult { input: Int...
Crate v1.0.9 2026-10-10
crates.io
...let phone_type = 2i32; match PhoneType::try_from(phone_type) { Ok(PhoneType::Mobile) => ..., Ok(PhoneType::Home) => ..., Ok(PhoneType::Work) => ..., Err(_) => ..., } Additionally, wherever a proto enum is used as a field in a Message , the message will have 'accessor' methods to get/set the value of the field as the Rust...
Crate v0.14.6 2026-11-12
docs.rs
...proptest! { // snip... #[test] fn parses_all_valid_dates(s in "[0-9]{4}-[0-9]{2}-[0-9]{2}") { parse_date(&s).unwrap(); } } The thing to the right-hand side of in is actually a regular expression , and s is chosen from strings which match it. So in our previous...
Crate v1.12.0 2026-10-10
docs.rs
...None, }; // insert with ON CONFLICT on primary key do nothing, with MySQL specific polyfill let result = Fruit::insert_many([apple, pear]) .on_conflict_do_nothing() .exec(db) .await?; matches!(result, TryInsertResult::Conflicted); Update ActiveModel avoids race conditions by updating only the fields you've changed, never overwriting untouched columns. You...
Crate v2.0.4 2026-09-27
crates.io
...The #[files(...)] attribute ignores matched directory paths by default, returning only file paths. If you need the test cases to include directories found by the glob pattern, use the #[dirs] attribute in conjunction with #[files(...)] . Use #[once] Fixture If you need to a fixture that should be initialized just once...
Crate v0.29.0 2026-11-22
docs.rs
...Kiddo is not intended as a library for high-dimensional vector search or feature matching over hundreds or thousands of dimensions, where plain k-d trees are usually the wrong data structure and other approaches are more appropriate. The API does not impose a hard dimensional limit, but Kiddo is...
Crate v6.3.2 2026-11-25
docs.rs
...Create a new instance of the DAO that will use the client let dao = MyUserDao::new(metrics); // Try to lookup a user by ID! match dao.get_user_by_id(123) { Some(u) => println!("Found a user!"), None => println!("No user!") }; Quiet Metric Sending and Error Handling When sending metrics...
Crate v1.8.0 2026-04-11
crates.io
...EdgeDataMerge<ShapeCountBoolean, Self>) -> Self { match (ctx.lhs_data, ctx.rhs_data) { (EdgeKind::Red, EdgeKind::Red) => EdgeKind::Red, (EdgeKind::Green, EdgeKind::Green) => EdgeKind::Green, _ => EdgeKind::Undefined, } } } let mut overlay = EdgeOverlay::new(8); let red_square = [ [0, 0], [4, 0], [4, 4], [0, 4], ]; let green_square = [ [2, 0], [6, 0], [6...
Crate v9.2.0 2026-11-15
docs.rs
...Result<Version> = "1.2.x".parse().into_diagnostic(); match version_result { Err(e) => println!("{:?}", e), Ok(version) => println!("{}", version), } } ... diagnostic code URLs miette supports providing a URL for individual diagnostics. This URL will be displayed as an actual link in supported terminals, like so: To use this, you can add...
Crate v7.6.0 2025-04-27
crates.io
...serde_json::error::Error × data did not match any variant of untagged enum LambdaRequest An simpler alternative is to cURL the following endpoint based on the address and port you defined. For example: curl -v -X POST \ 'http://127.0.0.1:9000/lambda-url/<lambda-function-name>/' \ -H 'content...
Crate v1.5.0 2026-10-21
crates.io
...mypy.stubtest integration mypy stubtest validates that stub files match runtime behavior. You can add it to your test suite: uv run stubtest your_module_name --ignore-missing-stub --ignore-disjoint-bases Required flags for PyO3/maturin projects --ignore-missing-stub - Maturin creates internal native modules ( .so files) that re...
Crate v0.23.3 2026-11-20
crates.io
...mypy.stubtest integration mypy stubtest validates that stub files match runtime behavior. You can add it to your test suite: uv run stubtest your_module_name --ignore-missing-stub --ignore-disjoint-bases Required flags for PyO3/maturin projects --ignore-missing-stub - Maturin creates internal native modules ( .so files) that re...
Crate v0.23.3 2026-11-20
docs.rs
...The order of the fields in the struct must match the order of the fields in the Avro schema! Simple types The vast majority of the times, schemas tend to define a record as a top-level container encapsulating all the values to convert as fields and providing documentation for...
Crate v0.23.0 2026-11-17
crates.io
...codegen-emitted FooServiceServer<T> with compile-time match dispatch (no Arc<dyn Handler> vtable), a two-frame GrpcUnaryBo
Crate v0.8.2 2026-09-21
github.com
...Instead of using matching begin/end style function calls (which can be error prone) egui prefers to use FnOnce closures passed to a wrapping function. Lambdas are a bit ugly though, so I'd like to find a nicer solution to this. More discussion of this at https://github.com...
Crate v0.37.0 2026-10-15
sagiegurari.github.io
...It is also possible to define platform specific aliases, for example: [tasks.my_task] linux_alias = "linux_my_task" windows_alias = "windows_my_task" mac_alias = "mac_my_task" [tasks.linux_my_task] [tasks.mac_my_task] [tasks.windows_my_task] If platform specific alias is found and matches current...
Crate v0.37.24 2025-01-18
magiclen.org
...Both tables match type names syntactically (by the last path segment), so a user-defined type that happens to share a name with one of these std types is treated the same way; if the resulting bounds do not fit such a type, set them explicitly with bound(...) . Bound Inheritance...
Crate v0.8.2 2026-11-08
crates.io
...See also --output-path. --failure-mode <any|all> Fail if `any` or `all` profiles cannot be merged (default to `any`) --ignore-filename-regex <PATTERN> Skip source code files with file paths that match the given regular expression --show-instantiations Show instantiations in report --no-cfg-coverage Unset cfg(coverage), which...
Crate v0.9.2 2026-11-20
docs.rs
...In this case, the examples' IP configuration must match your LAN's! NOTE: this ONLY works with actual wired Ethernet connections. It will NOT work on a WiFi connection. # Replace with your wired Ethernet interface name ETH=enp0s20f0u1u1 sudo modprobe bridge sudo modprobe br_netfilter sudo sysctl -w net.bridge...
Crate v0.14.0 2026-08-17
crates.io
...options.required_signature_type = Some("JWT".into()); options.required_content_type = Some("foo+jwt".into()); When validating CWTs, note that CWTs do not have a content_type field in their header, and therefore attempting to match a specific one by setting required_content_type during validation will always result in...
Crate v0.15.1 2026-11-18
"It's a footgun, yes, but it's a sound footgun."

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.