[−][src]Derive Macro macro_input_macros::MacroInput
#[derive(MacroInput)] { // Attributes available to this derive: #[macro_input] }
automatically derive From<&[syn::Attribute]>
, fn lint() -> &'static impl Lint<Vec<syn::Attribute>>
and fn strip(attrs: &mut Vec<syn::Attribute>)
Example
#[derive(MacroInput)] pub struct Input { pub flag: Option<()>, pub optional: Option<i32>, #[macro_input(default_value = 3)] pub with_default: i32, pub required: i32, } #[derive(MacroInput)] #[macro_input(rename = "YetAnotherName")] pub struct OtherInput { #[macro_input(rename = "new_name")] pub renamed: i32, }