pub fn expand(&self, input_trait: &mut ItemTrait) -> TokenStream {
        // Build all the super traits
        let factory_traits: Punctuated<TypeParamBound, Token![+]> = {
            let types = self.types.iter();
            let factory_name = &self.factory_trait;

            parse_quote! {
                #(#factory_name<#types>)+*
            }
        };

        // Append extra factory super traits
        input_trait.supertraits.extend(factory_traits);

        quote! {
            #input_trait
        }
    }
/// Add factory super traits to an `ItemTrait` to turn the `ItemTrait` into an Abstract Factory
Add factory super traits to an `ItemTrait` to turn the `ItemTrait` into an Abstract Factory
Add factory super traits to an ` ItemTrait ` to turn the ` ItemTrait ` into an Abstract Factory
pub fn expand(&self, input_trait: &mut ItemTrait) -> TokenStream {
        // Build all the super traits
        let factory_traits: Punctuated<TypeParamBound, Token![+]> = {
            let types = self.types.iter();
            let factory_name = &self.factory_trait;
            parse_quote! {
                #(#factory_name<#types>)+*
            }
        };
        // Append extra factory super traits
        input_trait.supertraits.extend(factory_traits);
        quote! {
            #input_trait
        }
    }
pub fn expand ( & self , input_trait : & mut ItemTrait ) -> TokenStream { // Build all the super traits let factory_traits : Punctuated < TypeParamBound , Token ! [ ] > = { let types = self . types . iter ( ) ; let factory_name = & self . factory_trait ; parse_quote ! { ( factory_name types ) } } ; // Append extra factory super traits input_trait . supertraits . extend ( factory_traits ) ; quote ! { input_trait } }
Add factory super traits to an `ItemTrait` to turn the `ItemTrait` into an Abstract Factory
Add factory super traits to an ` ItemTrait ` to turn the ` ItemTrait ` into an Abstract Factory
&self
input_trait
&mut ItemTrait
&self
input_trait
&mut ItemTrait