Crates.io | variadics_macro |
lib.rs | variadics_macro |
version | 0.5.5 |
source | src |
created_at | 2024-11-08 19:26:11.056875 |
updated_at | 2024-11-08 19:26:11.056875 |
description | Procedural macros for the `variadics` crate. |
homepage | |
repository | |
max_upload_size | |
id | 1441470 |
size | 4,525 |
tuple!
MacroCreate 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, ())));