#[doc(hidden)]
#[macro_export]
macro_rules! for_each_tuple {
(@
$macro:ident
[$count:expr]
[
$($param_id:ident: $param_ty:ident),*
]
[]
) => {
$macro!([$count] ($($param_id: $param_ty),*));
};
(@
$macro:ident
[$count:expr]
[
$($param_id:ident: $param_ty:ident),*
]
[
$first_ident:ident: $first_type:ident
$(, $rest_ident:ident: $rest_type:ident)*
$(,)?
]
) => {
$macro!([$count] ($($param_id: $param_ty),*));
for_each_tuple!(@
$macro
[$count + 1]
[
$($param_id: $param_ty, )*
$first_ident: $first_type
]
[
$($rest_ident: $rest_type),*
]
);
};
($macro:ident) => {
for_each_tuple!(@ $macro [0] [] [
p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8,
p9: P9, p10: P10, p11: P11, p12: P12, p13: P13, p14: P14, p15: P15, p16: P16,
p17: P17, p18: P18, p19: P19, p20: P20, p21: P21, p22: P22, p23: P23, p24: P24,
p25: P25, p26: P26, p27: P27, p28: P28, p29: P29, p30: P30, p31: P31, p32: P32,
]);
};
}
pub(super) use for_each_tuple;