[][src]Macro macro_macro::macro_template

macro_template!() { /* proc-macro */ }

Declare a named macro template

Examples

use macro_macro::{macro_macro, macro_template};

macro_template!(NAME = {
    #[derive(Clone)] // Macros to add to strut when name matches
    struct __ {
        /*#[...]*/ __ : !, // Macros to add to field when name and type matches

        /*#[...]*/ __ : !, // Macros to add to field when name and type matches
    }
});

fn main() {
  // ...
}

Panics

If the template input is not valid.