prosa-macros 0.4.2

ProSA macros
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use quote::quote;

/// Implementation of the ProSA Adaptor Derive macro
pub(crate) fn adaptor_impl(ast: syn::DeriveInput) -> syn::parse::Result<proc_macro2::TokenStream> {
    let name = &ast.ident;
    let (impl_generics, type_generics, where_clause) = &ast.generics.split_for_impl();
    Ok(quote! {
        impl #impl_generics prosa::core::adaptor::Adaptor for #name #type_generics #where_clause {
            fn terminate(&self) {}
        }
    })
}