macro_rules! proc_macro_filler { ($ident:ident, $generator:path) => { ... }; }
Expand description
One-line wrapper that declares a filler macro.
Example
portrait_framework::proc_macro_filler!(foo, Generator);
struct Generator(portrait_framework::NoArgs);
impl portrait_framework::Generate for Generator {
fn generate_const(
&mut self,
context: portrait_framework::Context,
item: &syn::TraitItemConst,
) -> syn::Result<syn::ImplItemConst> {
todo!()
}
fn generate_fn(
&mut self,
context: portrait_framework::Context,
item: &syn::TraitItemFn,
) -> syn::Result<syn::ImplItemFn> {
todo!()
}
fn generate_type(
&mut self,
context: portrait_framework::Context,
item: &syn::TraitItemType,
) -> syn::Result<syn::ImplItemType> {
todo!()
}
}This declares a filler macro called foo,
where each missing item is generated by calling the corresponding funciton.