graham.cool
...Any generated schema should match how serde_json would serialize/deserialize to/from JSON. To support this, Schemars will check for any #[serde(...)] attributes on types that derive JsonSchema , and adjust the generated schema accordingly. use schemars::{schema_for, JsonSchema}; use serde::{Deserialize, Serialize}; #[derive(Deserialize, Serialize, JsonSchema)] #[serde(rename...
Crate
v1.2.3
2026-10-12
graham.cool
...Any generated schema should match how serde_json would serialize/deserialize to/from JSON. To support this, Schemars will check for any #[serde(...)] attributes on types that derive JsonSchema , and adjust the generated schema accordingly. use schemars::{schema_for, JsonSchema}; use serde::{Deserialize, Serialize}; #[derive(Deserialize, Serialize, JsonSchema)] #[serde(rename...
Crate
v1.2.3
2026-10-12
crates.io
...If the discriminator matches, it returns the next length bytes. If not, it jumps ahead length bytes and reads the next 8-byte discriminator. Serialization of variable-length types The initial example works using the bytemuck crate for zero-copy serialization and deserialization. It's possible to use Borsh by...
Crate
v0.9.1
2026-03-23
tokio.rs
...loop { let n = match socket.read(&mut buf).await { // socket closed Ok(0) => return, Ok(n) => n, Err(e) => { eprintln!("failed to read from socket; err = {:?}", e); return; } }; // Write the data back if let Err(e) = socket.write_all(&buf[0..n]).await { eprintln!("failed to write to socket; err...
Crate
v1.54.1
2026-10-21
rustxlsxwriter.github.io
...In most cases the output matches the output from Excel exactly. Performance . The library is within 10% of the similar C library and it also supports a constant memory mode for writing large files. Comprehensive documentation . There is extensive API documentation as well as user guides, a tutorial, and a...
Crate
v0.104.0
2026-11-22
gstreamer.freedesktop.org
...Make sure to select the version that matches your Rust toolchain, i.e. MinGW or MSVC. After installation set the ``PATH` environment variable as follows: # For a UNIX-style shell: $ export PATH="c:/gstreamer/1.0/msvc_x86_64/bin${PATH:+:$PATH}" # For cmd.exe: $ set PATH=C:\gstreamer\1...
Crate
v0.25.4
2026-09-21
gstreamer.freedesktop.org
...Make sure to select the version that matches your Rust toolchain, i.e. MinGW or MSVC. After installation set the ``PATH` environment variable as follows: # For a UNIX-style shell: $ export PATH="c:/gstreamer/1.0/msvc_x86_64/bin${PATH:+:$PATH}" # For cmd.exe: $ set PATH=C:\gstreamer\1...
Crate
v0.25.4
2026-09-21
gstreamer.freedesktop.org
...Make sure to select the version that matches your Rust toolchain, i.e. MinGW or MSVC. After installation set the ``PATH` environment variable as follows: # For a UNIX-style shell: $ export PATH="c:/gstreamer/1.0/msvc_x86_64/bin${PATH:+:$PATH}" # For cmd.exe: $ set PATH=C:\gstreamer\1...
Crate
v0.25.2
2026-05-11
gstreamer.freedesktop.org
...Make sure to select the version that matches your Rust toolchain, i.e. MinGW or MSVC. After installation set the ``PATH` environment variable as follows: # For a UNIX-style shell: $ export PATH="c:/gstreamer/1.0/msvc_x86_64/bin${PATH:+:$PATH}" # For cmd.exe: $ set PATH=C:\gstreamer\1...
Crate
v0.25.4
2026-09-21
docs.rs
...type StringRef = ForLt!(&String); match polonius::<_, _, StringRef>(map, |map| match map.get(&22) { | Some(ret) => PoloniusResult::Borrowing(ret), | None => PoloniusResult::Owned { value: 42, // We cannot name `map` in this branch since `ret` borrows it in the // other (the very lack-of-polonius problem). input_borrow: /* map */ Placeholder, }, }) { // 🎩🪄 `polonius-the...
Crate
v0.6.0
2026-08-25
docs.rs
...Simpler solution If you don't need advanced features but just to test markdown content, the doc-comment crate might better match your needs. It also prevents recompilations and can be used as a dev-dependency . License Licensed under either of Apache License, Version 2.0 ( LICENSE-APACHE or https...
Crate
v0.14.2
2026-10-18
crates.io
...Scaling RealFFT matches the behaviour of RustFFT and does not normalize the output of either forward or inverse FFT. To get normalized results, each element must be scaled by 1/sqrt(length) , where length is the length of the real-valued signal. If the processing involves both an FFT and...
Crate
v3.5.1
2026-10-26
docs.rs
...usize) -> usize { match n { 0 => 0, 1 | 2 => 1, _ => fib(n - 1) + fib(n - 2), } } #[magnus::init] fn init(ruby: &magnus::Ruby) -> Result<(), Error> { ruby.define_global_function("fib", magnus::function!(fib, 1)); Ok(()) } Defining a method (with a Ruby self argument): fn is_blank(rb_self: String) -> bool { !rb...
Crate
v0.9.4
2026-11-15
docs.rs
...It is recommended to depend on the full version of the crate since types may change in patch-level updates in order to match Gitlab's interface: gitlab = "=0.1902.0" API bugs Sometimes, the API will return null for fields that have been added after the entry was created...
Crate
v0.1905.0
2026-10-23
docs.rs
...prefix of another scope using bit manipulation in only a few instructions Cache regex matches to reduce number of times oniguruma is asked to search a line Accelerate scope lookups to reduce how much selector matching has to be done to highlight a list of scope operations Lazily compile regexes...
Crate
v5.3.0
2025-09-27
crates.io
...spanned::Spanned, DeriveInput, ItemStruct, Fields, Attribute , parse_macro_input}; use quote::quote; fn process_attrs(attrs: &[Attribute]) -> Vec<Attribute> { attrs .iter() .filter_map(|attr| match process_attr(attr) { Ok(res) => Some(res), Err(msg) => { emit_error!(attr, "Invalid attribute: {}", msg); None } }) .collect() } fn process_fields(_attrs: &Fields) -> Vec<TokenStream> { // processing...
Crate
v2.0.1
2024-09-06
docs.rs
...let choice = get_choice(); match choice { Choices::This => { /* ... */ }, Choices::That => { /* ... */ }, Choices::Other => { // This case optimized out entirely, no panic emitted. assume!( unsafe: @unreachable, "choice was other", ); }, } use assume::assume; #[inline(always)] fn compute_value() -> usize { let result = compute_value_internal(); // Can also be used to provide hints to the caller...
Crate
v0.5.0
2023-03-25
docs.rs
...To put it simply you get something similar to the following: #[derive(Debug, Clone, Copy, PartialEq, Eq)] enum DrinkKind { Mate, Coffee, Tea } impl Drink { const fn kind(&self) -> DrinkKind { match self { Drink::Mate => DrinkKind::Mate, Drink::Coffee(..) => DrinkKind::Coffee, Drink::Tea { .. } => DrinkKind::Tea, } } } Const context The kind() method is a...
Crate
v0.5.1
2026-08-31
docs.rs
...To put it simply you get something similar to the following: #[derive(Debug, Clone, Copy, PartialEq, Eq)] enum DrinkKind { Mate, Coffee, Tea } impl Drink { const fn kind(&self) -> DrinkKind { match self { Drink::Mate => DrinkKind::Mate, Drink::Coffee(..) => DrinkKind::Coffee, Drink::Tea { .. } => DrinkKind::Tea, } } } Const context The kind() method is a...
Crate
v0.5.1
2026-08-31
github.com
...And whenever the build script detects that skia-bindings is built from inside a crate and a prebuilt archive is available that matches the repository's hash, platform, and features, it downloads the package, unpacks it, and skips the full build step of Skia and the bindings. Prebuilt Binaries in...
Crate
v0.158.0
2026-11-25