impl_for_tuples_attr

Macro impl_for_tuples_attr 

Source
macro_rules! impl_for_tuples_attr {
    ( $( $input:tt )* ) => { ... };
}
Expand description

Puts the impl_for_tuples attribute above the given code.

The main purpose of this macro is to handle the tuples-* feature which informs the attribute about the maximum size of the tuple to generate. Besides that, there is no difference to use the attribute directly.

ยงExample

trait ILoveTuples {
    fn really_hard();
}

frame_support::impl_for_tuples_attr! {
    impl ILoveTuples for Tuple {
        fn really_hard() {
            for_tuples! { #(
                // Print it for each tuple
                println!("I LOVE TUPLES");
            )* }
        }
    }
}