Macro variadic_generics::va_expand [−][src]
macro_rules! va_expand {
($($tt : tt) +) => { ... };
}
Expand description
Generates a macro for you and immediatly passes it on to
va_invoke
.
ⓘ
va_expand!{ ($va_len:tt) ($($va_idents),+) ($($va_indices:tt),+)
...
}
will be expanded to
ⓘ
macro_rules! _va_mac {
(($va_len:tt) ($($va_idents),+) ($($va_indices:tt),+)) => {
...
}
}
va_invoke!(_va_mac);
NOTE Due to language limitations (macro-expanded macro_rules!
s may
not shadow existing macros (see RFC 1560)), when calling this macro twice
or more within the same module, you need to supply a unique identifier as
the very first argument (which will be the name of the generated macro).
You can choose it to be random or descriptive.
ⓘ
va_expand!{ _asf ($va_len:tt) ($($va_idents),+) ($($va_indices:tt),+)
...
}
va_expand!{ _impl_mytraits ($va_len:tt) ($($va_idents),+)
($($va_indices:tt),+)
...
}