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.3.0
2025-05-30
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
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
github.com
...Superluminal https://superluminal.eu Windows only Tracing https://crates.io/crates/tracing Cross-platform The tracing backend injects tracing span!() macros that match the lifetime of the profiling macros. Tracing uses callbacks rather than inlining specific pre-determined code, so it is more flexible than profiling (at the cost of...
Crate
v1.0.18
2026-05-04
github.com
...Superluminal https://superluminal.eu Windows only Tracing https://crates.io/crates/tracing Cross-platform The tracing backend injects tracing span!() macros that match the lifetime of the profiling macros. Tracing uses callbacks rather than inlining specific pre-determined code, so it is more flexible than profiling (at the cost of...
Crate
v1.0.18
2026-05-04
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.5
2025-05-30
docs.rs
...bool = true; let val = condval!(if COND { "hello" } else { 42 }); assert_eq!(val, "hello"); if let pattern matching is also supported: use condtype::condval; const STR: Option<&str> = Some("hello"); let val = condval!(if let Some(str) = STR { str.to_uppercase() } else { 42 }); assert_eq!(val, "HELLO"); Platform-Specific Types...
Crate
v1.3.0
2023-08-20
github.com
...Result<Response<T>, Status>) { match req_result { Ok(response) => { // Handle successful response }, Err(status) => { let err_details = status.get_error_details(); if let Some(bad_request) = err_details.bad_request() { // Handle bad_request details } if let Some(help) = err_details.help() { // Handle help details } if let Some(localized_message) = err...
Crate
v0.14.6
2026-05-07
crates.io
...stream")? .header("Authorization", "Bearer token")? .build_with_transport(transport); // Stream events let mut stream = client.stream(); while let Some(event) = stream.try_next().await? { match event { SSE::Event(evt) => println!("Event: {}", evt.event_type), SSE::Comment(c) => println!("Comment: {}", c), SSE::Connected(_) => println!("Connected!"), } } Ok(()) } Example The tail example demonstrates...
Crate
v0.18.0
2026-08-10
github.com
...Routerify's core features: π Design complex routing using scopes and middlewares π Fast route matching using RegexSet πΊ Route handlers may return any HttpBody β Flexible error handling strategy π WebSocket support out of the box. π₯ Route handlers and middleware may share state π Extensive documentation and examples To generate a quick server app using...
Crate
v3.0.0
2021-12-24
docs.rs
...This allows idiomatic handling of bitflags, such as with match and iter . Features Uses enums to represent individual flagsβa set of flags is a separate type from a single flag. Automatically chooses a free bit when you don't specify. Detects incorrect BitFlags at compile time. Has a similar...
Crate
v0.7.12
2025-06-09
crates.io
...Either may be set on its own; the unset half is derived from OPENSSL_DIR , matching openssl-sys . pkg-config (Unix only) β probes openssl , aws-lc , libcrypto , then libcrypto-awslc , used only when the variables above are unset; honors PKG_CONFIG_ALLOW_CROSS . Each OPENSSL_* variable also honors a target...
Crate
v0.14.1
2026-08-07
sentry.io
...use sentry::Hub; use sentry_tower::SentryLayer; // Compose a Tower service let hello = Arc::new(Hub::with(|hub| Hub::new_from_top(hub))); let other = Arc::new(Hub::with(|hub| Hub::new_from_top(hub))); let service = ServiceBuilder::new() .layer(SentryLayer::new(|req: &Request| match req.as_str() { "hello" => hello...
Crate
v0.49.1
2026-08-03
cosmwasm.com
...Option<Data>| -> StdResult<Data> { match d { Some(one) => Ok(Data { name: one.name, age: one.age + 1, }), None => Ok(Data { name: "Newborn".to_string(), age: 0, }), } }; let old_john = PEOPLE.update(&mut store, "john", birthday)?; assert_eq!(33, old_john.age); assert_eq!("John", old_john.name.as_str()); let...
Crate
v3.0.1
2025-08-28
crates.io
...Directory Crate Notes selectors CSS Selector matching servo_arc A variant on std::Arc You may also be interested in the cssparser crate which lives in the servo/rust-cssparser repo. Support Crates Low-level crates which could technically be used standalone but are unlikely to be generally useful in...
Crate
v0.4.3
2025-11-12
docs.rs
...a Rust-idiomatic API does not need to match the Go or Java equivalent. May lag, omit, or extend cross-client parity items. What goes where? Concern Core ( async-nats ) Orbit Connect, publish, subscribe, request/reply β
JetStream publish, consumers, streams, KV, OS β
Service API (request/reply micro-services) β
Wire-protocol...
Crate
v0.50.0
2026-07-20
crates.io
...This behavior can be turned off via http_status_as_error() use ureq::Error; match ureq::get("http://mypage.example.com/").call() { Ok(response) => { /* it worked */}, Err(Error::StatusCode(code)) => { /* the server returned an unexpected status code (such as 400, 500 etc) */ } Err(_) => { /* some kind of io/transport/etc error...
Crate
v3.4.0
2026-08-08
crates.io
...With NEVec , you're freed from the boilerplate of constantly needing to check is_empty() or pattern matching before proceeding, or erroring if you can't. So overall, code, type signatures, and logic become cleaner. Consider that unlike Vec , [ NEVec::first() ] and [ NEVec::last() ] don't return in Option ; they...
Crate
v1.4.0
2026-07-28
crates.io
...to avoid shipping (and maintaining) multiple implementations of core font parsing for skrifa consumers. Further context in https://github.com/googlefonts/fontations/issues/956 . Matches HarfBuzz v13.0.0 . Why? https://github.com/googlefonts/oxidize outlines Google Fonts motivations to try to migrate font production and consumption to Rust. Major...
Crate
v0.13.1
2026-08-21
docs.rs
...fn next_chunk(buf: &mut MultiBuf) -> &[u8]; } unsafe extern "C++" { // One or more headers with the matching C++ declarations. Our code // generators don't read it but it gets #include'd and used in static // assertions to ensure our picture of the FFI boundary is accurate. include!("demo/include/blobstore...
Crate
v1.0.199
2026-08-08