impl-trait-for-tuples 0.2.3

Attribute macro to implement a trait for tuples
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
trait Test {
    type Test;

    fn test() -> Self::Test;
}

#[impl_trait_for_tuples::impl_for_tuples(2)]
impl Test for Tuple {
    for_tuples!( type Test = ( #( Tuple::Test ),* ); );

    fn test() -> Self::Test {
        for_tuples!( ( #( Tuple.test() )$* ) )
    }
}

fn main() {}