Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
docs.rs
...Many curves match our descriptions, but we require some extra properties for efficiency purposes: q should be smaller than 2 383 , and r should be smaller than 2 255 , so that the most significant bit is unset when using 64-bit or 32-bit limbs. This allows for cheap reductions...
Crate v0.6.2 2023-09-05
docs.rs
...u16) -> Self { match value { 0 => Self::A, 1 => Self::B, _ => Self::C, } } } // Usage: let mut val = MyBitfield::new() .with_int(3 << 15) .with_tiny(1) .with_negative(-3) .with_custom(CustomEnum::B) .with_public(2) // .with_read_only(true) <- Would not compile .with_write_only(false); println!("{val:?}"); let raw...
Crate v0.13.0 2026-04-04
docs.rs
...by shared reference, or by mutable reference as needed. // If the error was caused by redaction, then return a // tombstone instead of the content. match root_cause.downcast_ref::<DataStoreError>() { Some(DataStoreError::Censored(_)) => Ok(Poll::Ready(REDACTED_CONTENT)), None => Err(error), } If using Rust ≥ 1.65, a backtrace is captured...
Crate v1.0.104 2026-07-18
docs.rs
...TransitProcess| { tx.send(process_info).unwrap(); thread::sleep(time::Duration::from_millis(500)); fs_extra::dir::TransitProcessResult::ContinueOrAbort }; copy_with_progress(&test_folder, &path_to, &options, handler).unwrap(); }); loop { match rx.try_recv() { Ok(process_info) => { println!("{} of {} bytes", process_info.copied_bytes, process_info.total_bytes); } Err(TryRecvError::Disconnected...
Crate v1.3.0 2023-02-03
docs.rs
...The browserscope standard is data-oriented, with regexes.yaml specifying the matching and extraction from user-agent strings. This library implements the maching protocols and provides various types to make loading the dataset easier, however it does not provide the data itself, to avoid dependencies on serialization libraries or constrain...
Crate v0.2.2 2026-03-22
crates.io
...For each PR submitted, CI verifies that the NASM objects newly built from source match the NASM objects currently in the repository. Using a system-installed AWS-LC If you have an existing AWS-LC installation (built and installed via CMake), you can link against it instead of building AWS...
Crate v0.44.0 2026-08-07
crates.io
...Note that #[repr(stabby)] does lose you the ability to pattern-match. Due to limitations of the trait solver, #[repr(stabby)] enums have a few paper-cuts: Compilation times suffer from #[repr(stabby)] enums. Additional trait bounds are required when writing impl -blocks for generic enums. They will always be...
Crate v72.1.16 2026-07-20
github.com
...Usage cargo add env_home Crate exports a single function env_home_dir that returns Option<PathBuf> use env_home::env_home_dir as home_dir; fn main() { match home_dir() { Some(path) => println!("User home directory: {}", path.display()), None => println!("No home found. HOME/USERPROFILE not set or empty...
Crate v0.1.0 2024-04-22
crates.io
...Note that #[repr(stabby)] does lose you the ability to pattern-match. Due to limitations of the trait solver, #[repr(stabby)] enums have a few paper-cuts: Compilation times suffer from #[repr(stabby)] enums. Additional trait bounds are required when writing impl -blocks for generic enums. They will always be...
Crate v72.1.16 2026-07-20
crates.io
...Note that #[repr(stabby)] does lose you the ability to pattern-match. Due to limitations of the trait solver, #[repr(stabby)] enums have a few paper-cuts: Compilation times suffer from #[repr(stabby)] enums. Additional trait bounds are required when writing impl -blocks for generic enums. They will always be...
Crate v72.1.16 2026-07-20
docs.rs
...In order to match the community standards, webrtc-rs is using the dual MIT+Apache-2.0 license. Contributing Contributors or Pull Requests are Welcome!!!
Crate v0.21.0-beta.2 2026-08-22
docs.rs
...assert_eq!( registry.get("Name").unwrap(), &ContainerFormat::NewTypeStruct(Box::new(Format::Str)), ); match registry.get("Person").unwrap() { ContainerFormat::Enum(variants) => assert_eq!(variants.len(), 2), _ => panic!(), }; // Export the registry in YAML. let data = serde_yaml::to_string(&registry).unwrap(); assert_eq!(&data, r#"--- Name: NEWTYPESTRUCT: STR Person: ENUM: 0: NickName...
Crate v0.6.0 2026-05-26
docs.rs
...use azure_core::{error::ErrorKind, http::StatusCode}; match client.get_secret("secret-name", None).await { Ok(secret) => println!("Secret: {:?}", secret.into_model()?.value), Err(e) => match e.kind() { ErrorKind::HttpResponse { status, error_code, .. } if *status == StatusCode::NotFound => { // Handle not found error. if let Some(code) = error_code { println!("ErrorCode: {}", code...
Crate v1.1.0 2026-07-10
crates.io
...u32, } impl Iterator for FibUntilIter { type Item = u32; fn next(&mut self) -> Option<Self::Item> { let current = self.curr; self.curr = self.next; self.next = current + self.next; match current > self.until { false => Some(current), true => None, } } } struct FibUntil(u32); impl Iterable for FibUntil { type Item = u32; type Iter = FibUntilIter...
Crate v1.3.0 2025-04-06
docs.rs
...window.clone()).unwrap(), ) .with_event_handler(|window, surface, window_id, event, elwt| { elwt.set_control_flow(ControlFlow::Wait); if window_id != window.id() { return; } match event { WindowEvent::RedrawRequested => { let Some(surface) = surface else { eprintln!("RedrawRequested fired before Resumed or after Suspended"); return; }; let size = window.inner_size(); surface .resize( NonZeroU32...
Crate v0.4.8 2025-12-13
codeberg.org
...MyContext, skip_teardown)] #[test] fn test_without_teardown_taking_a_mut_ref(ctx: &mut MyContext) {} ⚠️ Ensure that the context type specified in the macro matches the test function argument type exactly The error occurs when a context type with an absolute path is mixed with an it's alias. For...
Crate v0.5.8 2026-04-24
docs.rs
...For each PR submitted, CI verifies that the NASM objects newly built from source match the NASM objects currently in the repository. ring -compatibility Although this library attempts to be fully compatible with ring (v0.16.x), there are a few places where our behavior is observably different. Our implementation...
Crate v1.18.0 2026-08-07
docs.rs
...Celsius = match Celsius::try_new(0.0) { Ok(value) => value, Err(_) => panic!("Invalid value"), }; Alternatively, you can use a helper macro like this: macro_rules! nutype_const { ($name:ident, $ty:ty, $value:expr) => { const $name: $ty = match <$ty>::try_new($value) { Ok(value) => value, Err(_) => panic!("Invalid value"), }; }; } nutype_const...
Crate v0.8.0-beta.1 2026-06-18
docs.rs
...Celsius = match Celsius::try_new(0.0) { Ok(value) => value, Err(_) => panic!("Invalid value"), }; Alternatively, you can use a helper macro like this: macro_rules! nutype_const { ($name:ident, $ty:ty, $value:expr) => { const $name: $ty = match <$ty>::try_new($value) { Ok(value) => value, Err(_) => panic!("Invalid value"), }; }; } nutype_const...
Crate v0.8.0-beta.1 2026-06-18
github.com
btm
...target snapshot to rollback to, a negative value means the latest snapshot [default: -1] -S, --strict In this mode, if `snapshot_id` cannot be matched exactly, an error will be returned -h, --help Print help information Usage: btm clean [OPTIONS] Options: -p, --volume <VOLUME> The target volume to operate on...
Crate v3.0.1 2026-07-06
"* [`impl Not for !`](https://github.com/rust-lang/rust/pull/91122) (did you guess that "not never" is still "never"?)"

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.