proc_macro_impl_filler

Macro proc_macro_impl_filler 

Source
macro_rules! proc_macro_impl_filler {
    ($ident:ident, $generator:path) => { ... };
}
Expand description

One-line wrapper that declares a filler macro.

ยงExample

portrait_framework::proc_macro_impl_filler!(foo, Generator);
struct Generator(portrait_framework::NoArgs);
impl portrait_framework::GenerateImpl for Generator {
    fn generate_const(
        &mut self,
        context: portrait_framework::ImplContext,
        item: &syn::TraitItemConst,
    ) -> syn::Result<syn::ImplItemConst> {
        todo!()
    }
    fn generate_fn(
        &mut self,
        context: portrait_framework::ImplContext,
        item: &syn::TraitItemFn,
    ) -> syn::Result<syn::ImplItemFn> {
        todo!()
    }
    fn generate_type(
        &mut self,
        context: portrait_framework::ImplContext,
        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.