impl_tuple

Macro impl_tuple 

Source
macro_rules! impl_tuple {
    ($($T:ident $I:tt),+ $(,)?) => { ... };
    (@all [$($head_T:ident $head_I:tt)*] [$next_T:ident $next_I:tt $($tail:tt)*]) => { ... };
    (@all [$($head_T:ident $head_I:tt)*] []) => { ... };
    (@variants
            // The full tuple definition in type–index pairs.
            [$($AllT:ident $AllI:tt)+]
            // Types before the current index.
            [$($BeforeT:ident)*]
            // The types and indices at and after the current index.
            [$CurrT:ident $CurrI:tt $($AfterT:ident $AfterI:tt)*]
        ) => { ... };
    (@variants [$($AllT:ident $AllI:tt)+] [$($BeforeT:ident)*] []) => { ... };
}
Expand description

Generates various trait implementations for tuples.

§Safety

impl_tuple! should be provided name-number pairs, where each number is the ordinal of the preceding type name.