variadics_macro

Crates.iovariadics_macro
lib.rsvariadics_macro
version0.5.5
sourcesrc
created_at2024-11-08 19:26:11.056875
updated_at2024-11-08 19:26:11.056875
descriptionProcedural macros for the `variadics` crate.
homepage
repository
max_upload_size
id1441470
size4,525
Mingwei Samuel (MingweiSamuel)

documentation

https://docs.rs/variadics/

README

tuple! Macro

Create a tuple from a Variadic type known at compile time.

Example usage:

use variadics::var_expr;
use variadics_macro::tuple;

let tup = var_expr!(1, 2, 3, "four");
let a = tuple!(tup, 4);
assert_eq!(a, (1, 2, 3, "four"));

let tup = var_expr!(1, 2, var_expr!(3));
let b = tuple!(tup, 3);
assert_eq!(b, (1, 2, (3, ())));
Commit count: 0

cargo fmt