1 unstable release
new 0.5.5 | Nov 8, 2024 |
---|
#636 in Procedural macros
97 downloads per month
Used in 5 crates
(via lattices)
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
~73K SLoC