2 releases

0.5.6 Dec 23, 2024
0.5.5 Nov 8, 2024

#2246 in Procedural macros

Download history 107/week @ 2024-11-06 11/week @ 2024-11-13 18/week @ 2024-11-20 13/week @ 2024-11-27 28/week @ 2024-12-04 14/week @ 2024-12-11 129/week @ 2024-12-18 32/week @ 2024-12-25 30/week @ 2025-01-01 14/week @ 2025-01-08

207 downloads per month
Used in 8 crates (via lattices)

Apache-2.0

59KB
1.5K SLoC

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
~70K SLoC