pub fn to_build_step_fn(
        &self,
        builder_name: &Ident,
        generic_arguments: &GenericArguments,
        vis: &Visibility,
    ) -> proc_macro2::TokenStream {
        let Self {
            name,
            ty,
            wrapped_name,
        } = self;
        if let Some(wrapped_name) = wrapped_name {
            quote! {
                #[doc(hidden)]
                #vis fn #name(mut self, #name: #ty) -> #builder_name<#generic_arguments> {
                    self.wrapped.#wrapped_name = ::std::option::Option::Some(#name);
                    #builder_name {
                        wrapped: self.wrapped,
                        _marker: ::std::marker::PhantomData,
                    }
                }
            }
        } else {
            quote! {
                #[doc(hidden)]
                #vis fn #name(mut self, #name: #ty) -> #builder_name<#generic_arguments> {
                    self.wrapped.#name = #name;
                    self
                }
            }
        }
    }
/// Each field is set using a builder method
Each field is set using a builder method
Each field is set using a builder method
pub fn to_build_step_fn(
        &self,
        builder_name: &Ident,
        generic_arguments: &GenericArguments,
        vis: &Visibility,
    ) -> proc_macro2::TokenStream {
        let Self {
            name,
            ty,
            wrapped_name,
        } = self;
        if let Some(wrapped_name) = wrapped_name {
            quote! {
                #[doc(hidden)]
                #vis fn #name(mut self, #name: #ty) -> #builder_name<#generic_arguments> {
                    self.wrapped.#wrapped_name = ::std::option::Option::Some(#name);
                    #builder_name {
                        wrapped: self.wrapped,
                        _marker: ::std::marker::PhantomData,
                    }
                }
            }
        } else {
            quote! {
                #[doc(hidden)]
                #vis fn #name(mut self, #name: #ty) -> #builder_name<#generic_arguments> {
                    self.wrapped.#name = #name;
                    self
                }
            }
        }
    }
pub fn to_build_step_fn ( & self , builder_name : & Ident , generic_arguments : & GenericArguments , vis : & Visibility , ) -> proc_macro2 :: TokenStream { let Self { name , ty , wrapped_name , } = self ; if let Some ( wrapped_name ) = wrapped_name { quote ! { [ doc ( hidden ) ] vis fn name ( mut self name ty ) builder_name generic_arguments { self wrapped wrapped_name std option Option Some ( name ) builder_name { wrapped self wrapped _marker std marker PhantomData } } } } else { quote ! { [ doc ( hidden ) ] vis fn name ( mut self name ty ) builder_name generic_arguments { self wrapped name name self } } } }
Each field is set using a builder method
Each field is set using a builder method
&self
builder_name
&Ident
generic_arguments
&GenericArguments
vis
&Visibility
&self
builder_name
&Ident
generic_arguments
&GenericArguments
vis
&Visibility