#macro #variadics #tuple #procedural #proc-macro

macro variadics_macro

Procedural macros for the variadics crate

1 unstable release

0.5.5 Nov 8, 2024

#658 in Procedural macros

Download history 110/week @ 2024-11-08 15/week @ 2024-11-15 13/week @ 2024-11-22 21/week @ 2024-11-29

159 downloads per month
Used in 5 crates (via lattices)

Apache-2.0

4KB

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, ())));

Dependencies

~4MB
~71K SLoC