docs.rs
...It's not completely incidental due to Web history, but encoding_rs will prioritize compliance with the WHATWG Encoding Standard over matching the Windows system converters exactly. Still, encoding_rs is in practice useful for decoding legacy Windows data, because all the "ANSI code pages" that are the default for...
Crate
v0.1.2
2024-07-21
docs.rs
...Attribute::remove_attributes which takes an &mut Vec<syn::Attribute> and does not only parse the Attribute but also removes those matching. Useful for helper attributes for proc macros, where the helper attributes need to be removed. For parsing a single TokenStream e.g. for parsing the proc macro input...
Crate
v0.10.5
2025-10-02
crates.io
...As such, substrings may not always match your intuition: use substring::Substring; assert_eq!("ã".substring(0, 1), "a"); // As opposed to "ã". assert_eq!("ã".substring(1, 2), "\u{0303}") The above example occurs because "ã" is technically made up of two UTF-8 scalar values: the letter "a...
Crate
v1.4.5
2021-02-04
docs.rs
Macros to keep types in lockstep with DBus XML definitions zbus-lockstep-macros zbus-lockstep-macros extends zbus-lockstep to match the signature of signal types <T as zvariant::Type>::signature() with a corresponding signature from a DBus XML file more conveniently and succinctly. Motivation In the context of IPC...
Crate
v0.7.0
2026-07-27
docs.rs
...1u64 }).unwrap(); ident.normalize().unwrap(); assert!(matches!(ident, Format::TypeName(s) if s.ends_with("Foo<u64>"))); Contributing See the CONTRIBUTING file for how to help out. License This project is available under the terms of either the Apache 2.0 license or the MIT license .
Crate
v0.3.0
2026-05-26
docs.rs
...I run async every 7 seconds"); // Query the next execution time for this job let next_tick = l.next_tick_for_job(uuid).await; match next_tick { Ok(Some(ts)) => println!("Next time for 7s job is {:?}", ts), _ => println!("Could not get next tick for 7s job"), } }) })? ).await?; // Needs the...
Crate
v0.15.1
2025-10-28
docs.rs
...The macro takes in a token stream and for each token that matches a given predicate it replaces that token with a given replacement sequence of tokens. For example the caller may want to replace the token self with the single token __value . The rule shown here is responsible for...
Crate
v1.0.9
2022-12-19
crates.io
...The user-space kernel API is often API-incompatible with the kernel space one, and even in the cases where they match, they are sometimes ABI incompatible such that using this library would have undefined behavior . Usage Add the following to your Cargo.toml to conditionally include mach on those...
Crate
v0.3.2
2019-06-01
docs.rs
...a bare byte-oriented x25519 function which matches the function specified in RFC7748 , as well as a higher-level Rust API for static and ephemeral Diffie-Hellman. Examples Alice and Bob are two adorable kittens who have lost their mittens, and they wish to be able to send secret messages...
Crate
v3.0.0
2026-07-06
docs.rs
...TokenStream) -> Result<TokenStream> { // Parse the struct or enum you want to implement a derive for let parse = Parse::new(input)?; // Get a reference to the generator let (mut generator, body) = parse.into_generator(); match body { Body::Struct(body) => { // Implement your struct body here // See `Generator` for more information generator.impl...
Crate
v0.0.19
2025-12-17
codspeed.io
...u64) -> u64 { match n { 0 => 1, 1 => 1, n => fibonacci(n-1) + fibonacci(n-2), } } pub fn criterion_benchmark(c: &mut Criterion) { c.bench_function("fib 20", |b| b.iter(|| fibonacci(black_box(20)))); } criterion_group!(benches, criterion_benchmark); criterion_main!(benches); The last step in creating the Criterion benchmark...
Crate
v5.0.1
2026-06-26
crates.io
...Given a Ranges<u32> , the segments (Unbounded, Included(42u32)) and (Included(0), Included(42u32)) as well as (Included(1), Included(5)) and (Included(1), Included(3)) + (Included(4), Included(5)) are reported as unequal, even though the match the same versions: We can't tell that there isn't a...
Crate
v0.1.3
2026-04-28
docs.rs
...Wrap the mutable Broccoli FFI entry points in a local catch_unwind helper, matching the encoder FFI convention so Rust panics do not unwind across extern C when std panic catching is available. Return BrotliFileNotCraftedForConcatenation on caught panics and keep the existing pass-through behavior for no-std or pass...
Crate
v8.0.4
2026-06-14
crates.io
...The goal is to provide a matching and a safe error API, masking errors from LALR. fstring.rs Format strings. function.rs Collection of functions for parsing parameters, arguments. location.rs Datatypes to support source location information. mode.rs Execution mode check. Allowed modes are exec , eval or single . How...
Crate
v0.4.0
2024-08-06
docs.rs
...Zero copy deserialisation Support for serialisation buffer reuse and pooling Only safe Rust code No heap allocations Simple, descriptive, one-to-one types matching the RFCs Example use onc_rpc::{ auth::{AuthFlavor, AuthUnixParams}, CallBody, MessageType, RpcMessage, }; // Add RPC call authentication. let auth_params = AuthUnixParams::new( 42, // Stamp "bananas.local", // Machine...
Crate
v0.3.3
2026-01-16
github.com
...The computed width values may not match the actual rendered column width. For example, many Brahmic scripts like Devanagari have complex rendering rules which this crate does not currently handle (and will never fully handle, because the exact rendering depends on the font): extern crate unicode_width; use unicode_width...
Crate
v0.2.2
2025-10-06
github.com
...Encoding is also well optimized and is surpassing liblzma for level 0 to 3 and matches it for level 4 to 9. Data was assembled using lzma-rust2 v0.4.0 and liblzma v0.4.2. no_std Support This crate supports no_std environments by disabling the default std...
Crate
v0.19.0
2026-08-16
crates.io
...For more information on how to use it please refer to https://containers.dev To make sure your changes match the project style you can install the pre-commit hooks with pre-commit install . This requires pre-commit to be installed on your system. License Copyright (c) 2023 Lorenzo Murarotto...
Crate
v0.16.7
2026-08-16
crates.io
...Usage with Flatpak/Snap If you use Flatpak/Snap to publish your package and your Tauri identifier doesn't match the package id, set the DBUS_ID variable using the builder for the plugin, look at example. Contributing PRs accepted. Please make sure to read the Contributing Guide before making...
Crate
v2.4.3
2026-07-13
docs.rs
...By default, the member names of the struct are matched with the values in the header record of your CSV data. use std::{error::Error, io, process}; #[derive(Debug, serde::Deserialize)] struct Record { city: String, region: String, country: String, population: Option<u64>, } fn example() -> Result<(), Box<dyn Error>> { let mut...
Crate
v1.4.0
2025-10-17