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

macro variadics_macro

Procedural macros for the variadics crate

1 unstable release

new 0.5.5 Nov 8, 2024

#636 in Procedural macros

Download history 97/week @ 2024-11-06

97 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
~73K SLoC