fn builder_init_args(&self) -> Vec<TokenStream> {
        let v = self
            .input
            .required_fields
            .iter()
            .map(|f| {
                let ident = &f.ident;
                quote! {
                    #ident: None
                }
            })
            .chain(self.input.optional_fields.iter().map(|f| {
                if let (ident, Some((expr, setters))) = (&f.ident, &f.attrs.default.as_ref()) {
                    match *setters {
                        Setters::VALUE => quote_spanned! { expr.span() =>
                            #ident: Some(::builder_pattern::setter::Setter::Value(#expr))
                        },
                        Setters::LAZY => {
                            quote_spanned! { expr.span() =>
                                #ident: Some(
                                    ::builder_pattern::setter::Setter::Lazy(
                                        Box::new(#expr)
                                    )
                                )
                            }
                        }
                        _ => unimplemented!(),
                    }
                } else {
                    unimplemented!()
                }
            }))
            .collect::<Vec<_>>();
        v
    }
/// An iterator for initialize arguments of the builder.
/// Required fields are filled with `None`, optional fields are filled with given value via `default` attribute.
An iterator for initialize arguments of the builder.
Required fields are filled with `None`, optional fields are filled with given value via `default` attribute.
An iterator for initialize arguments of the builder . Required fields are filled with ` None ` optional fields are filled with given value via ` default ` attribute .
fn builder_init_args(&self) -> Vec<TokenStream> {
        let v = self
            .input
            .required_fields
            .iter()
            .map(|f| {
                let ident = &f.ident;
                quote! {
                    #ident: None
                }
            })
            .chain(self.input.optional_fields.iter().map(|f| {
                if let (ident, Some((expr, setters))) = (&f.ident, &f.attrs.default.as_ref()) {
                    match *setters {
                        Setters::VALUE => quote_spanned! { expr.span() =>
                            #ident: Some(::builder_pattern::setter::Setter::Value(#expr))
                        },
                        Setters::LAZY => {
                            quote_spanned! { expr.span() =>
                                #ident: Some(
                                    ::builder_pattern::setter::Setter::Lazy(
                                        Box::new(#expr)
                                    )
                                )
                            }
                        }
                        _ => unimplemented!(),
                    }
                } else {
                    unimplemented!()
                }
            }))
            .collect::<Vec<_>>();
        v
    }
fn builder_init_args ( & self ) -> Vec < TokenStream > { let v = self . input . required_fields . iter ( ) . map ( | f | { let ident = & f . ident ; quote ! { ident None } } ) . chain ( self . input . optional_fields . iter ( ) . map ( | f | { if let ( ident , Some ( ( expr , setters ) ) ) = ( & f . ident , & f . attrs . default . as_ref ( ) ) { match * setters { Setters :: VALUE => quote_spanned ! { expr span ( ) ident Some ( builder_pattern setter Setter Value ( expr ) ) } , Setters :: LAZY => { quote_spanned ! { expr span ( ) ident Some ( builder_pattern setter Setter Lazy ( Box new ( expr ) ) ) } } _ => unimplemented ! ( ) , } } else { unimplemented ! ( ) } } ) ) . collect :: < Vec < _ > > ( ) ; v }
An iterator for initialize arguments of the builder.
An iterator for initialize arguments of the builder .
&self
&self