pub fn generate_dfill_fns(&self) -> Tstream {
        if self.dfill_struct.is_none() {
            return quote! {};
        }

        let struct_name = self.dfill_struct.as_ref().unwrap();
        let tag_title_fns = self.unified_field_push_generator(DfillType::Title);
        let class_title_fns = self.unified_class_push_generator(DfillType::Title);

        let tag_title_fns_styled = self.unified_field_push_generator(DfillType::TitleStyled);
        let class_title_fns_styled = self.unified_class_push_generator(DfillType::TitleStyled);

        let tag_field_fns = self.unified_field_push_generator(DfillType::Field);
        let class_field_fns = self.unified_class_push_generator(DfillType::Field);
        let tag_field_fns_styled = self.unified_field_push_generator(DfillType::FieldStyled);
        let class_field_fns_styled = self.unified_class_push_generator(DfillType::FieldStyled);

        let cmp_fns = self.gen_dfill_cmp_fns();
        let filter_fns = self.gen_dfill_filter_fns();
        quote! {
            impl Dfill for #struct_name {
                fn build_title_fns(&mut self, opts: &Option<Vec<Self::FieldsType>>) {
                    opts.as_ref().and_then(|opt| {
                        opt.iter().for_each(|opt| match opt {
                            #tag_title_fns
                            #class_title_fns
                        });
                        Some(())
                    });
                }

                fn build_title_fns_styled(&mut self, opts: &Option<Vec<Self::FieldsType>>) {
                    opts.as_ref().and_then(|opt| {
                        opt.iter().for_each(|opt| match opt {
                            #tag_title_fns_styled
                            #class_title_fns_styled
                        });
                        Some(())
                    });
                }

                fn build_field_fns(&mut self, opts: &Option<Vec<Self::FieldsType>>) {
                    opts.as_ref().and_then(|opt| {
                        opt.iter().for_each(|opt| match opt {
                            #tag_field_fns
                            #class_field_fns
                        });
                        Some(())
                    });
                }

                fn build_field_fns_styled(&mut self, opts: &Option<Vec<Self::FieldsType>>) {
                    opts.as_ref().and_then(|opt| {
                        opt.iter().for_each(|opt| match opt {
                            #tag_field_fns_styled
                            #class_field_fns_styled
                        });
                        Some(())
                    });
                }

                fn sort_by(items: &mut Vec<&Self::Model>, tag: &Self::FieldsType, reverse: bool) {
                    let data: Self::DataType = Default::default();
                    match tag {
                        #cmp_fns
                        _ => {}
                    }
                }

                fn filter_by(&self, model: &Self::Model, tag: &Self::FieldsType, re: &Regex) -> bool {
                    let data: Self::DataType = Default::default();
                    match tag {
                        #filter_fns
                        _ => true
                    }
                }
            }
        }
    }
/// Generate the Dfill trait
/// Check the returned quote for detailed generated code
Generate the Dfill trait
Check the returned quote for detailed generated code
Generate the Dfill trait Check the returned quote for detailed generated code
pub fn generate_dfill_fns(&self) -> Tstream {
        if self.dfill_struct.is_none() {
            return quote! {};
        }
        let struct_name = self.dfill_struct.as_ref().unwrap();
        let tag_title_fns = self.unified_field_push_generator(DfillType::Title);
        let class_title_fns = self.unified_class_push_generator(DfillType::Title);
        let tag_title_fns_styled = self.unified_field_push_generator(DfillType::TitleStyled);
        let class_title_fns_styled = self.unified_class_push_generator(DfillType::TitleStyled);
        let tag_field_fns = self.unified_field_push_generator(DfillType::Field);
        let class_field_fns = self.unified_class_push_generator(DfillType::Field);
        let tag_field_fns_styled = self.unified_field_push_generator(DfillType::FieldStyled);
        let class_field_fns_styled = self.unified_class_push_generator(DfillType::FieldStyled);
        let cmp_fns = self.gen_dfill_cmp_fns();
        let filter_fns = self.gen_dfill_filter_fns();
        quote! {
            impl Dfill for #struct_name {
                fn build_title_fns(&mut self, opts: &Option<Vec<Self::FieldsType>>) {
                    opts.as_ref().and_then(|opt| {
                        opt.iter().for_each(|opt| match opt {
                            #tag_title_fns
                            #class_title_fns
                        });
                        Some(())
                    });
                }
                fn build_title_fns_styled(&mut self, opts: &Option<Vec<Self::FieldsType>>) {
                    opts.as_ref().and_then(|opt| {
                        opt.iter().for_each(|opt| match opt {
                            #tag_title_fns_styled
                            #class_title_fns_styled
                        });
                        Some(())
                    });
                }
                fn build_field_fns(&mut self, opts: &Option<Vec<Self::FieldsType>>) {
                    opts.as_ref().and_then(|opt| {
                        opt.iter().for_each(|opt| match opt {
                            #tag_field_fns
                            #class_field_fns
                        });
                        Some(())
                    });
                }
                fn build_field_fns_styled(&mut self, opts: &Option<Vec<Self::FieldsType>>) {
                    opts.as_ref().and_then(|opt| {
                        opt.iter().for_each(|opt| match opt {
                            #tag_field_fns_styled
                            #class_field_fns_styled
                        });
                        Some(())
                    });
                }
                fn sort_by(items: &mut Vec<&Self::Model>, tag: &Self::FieldsType, reverse: bool) {
                    let data: Self::DataType = Default::default();
                    match tag {
                        #cmp_fns
                        _ => {}
                    }
                }
                fn filter_by(&self, model: &Self::Model, tag: &Self::FieldsType, re: &Regex) -> bool {
                    let data: Self::DataType = Default::default();
                    match tag {
                        #filter_fns
                        _ => true
                    }
                }
            }
        }
    }
pub fn generate_dfill_fns ( & self ) -> Tstream { if self . dfill_struct . is_none ( ) { return quote ! { } ; } let struct_name = self . dfill_struct . as_ref ( ) . unwrap ( ) ; let tag_title_fns = self . unified_field_push_generator ( DfillType :: Title ) ; let class_title_fns = self . unified_class_push_generator ( DfillType :: Title ) ; let tag_title_fns_styled = self . unified_field_push_generator ( DfillType :: TitleStyled ) ; let class_title_fns_styled = self . unified_class_push_generator ( DfillType :: TitleStyled ) ; let tag_field_fns = self . unified_field_push_generator ( DfillType :: Field ) ; let class_field_fns = self . unified_class_push_generator ( DfillType :: Field ) ; let tag_field_fns_styled = self . unified_field_push_generator ( DfillType :: FieldStyled ) ; let class_field_fns_styled = self . unified_class_push_generator ( DfillType :: FieldStyled ) ; let cmp_fns = self . gen_dfill_cmp_fns ( ) ; let filter_fns = self . gen_dfill_filter_fns ( ) ; quote ! { impl Dfill for struct_name { fn build_title_fns ( mut self opts Option Vec Self FieldsType ) { opts as_ref ( ) and_then ( opt { opt iter ( ) for_each ( opt match opt { tag_title_fns class_title_fns } ) Some ( ( ) ) } ) } fn build_title_fns_styled ( mut self opts Option Vec Self FieldsType ) { opts as_ref ( ) and_then ( opt { opt iter ( ) for_each ( opt match opt { tag_title_fns_styled class_title_fns_styled } ) Some ( ( ) ) } ) } fn build_field_fns ( mut self opts Option Vec Self FieldsType ) { opts as_ref ( ) and_then ( opt { opt iter ( ) for_each ( opt match opt { tag_field_fns class_field_fns } ) Some ( ( ) ) } ) } fn build_field_fns_styled ( mut self opts Option Vec Self FieldsType ) { opts as_ref ( ) and_then ( opt { opt iter ( ) for_each ( opt match opt { tag_field_fns_styled class_field_fns_styled } ) Some ( ( ) ) } ) } fn sort_by ( items mut Vec Self Model tag Self FieldsType reverse bool ) { let data Self DataType Default default ( ) match tag { cmp_fns { } } } fn filter_by ( self model Self Model tag Self FieldsType re Regex ) bool { let data Self DataType Default default ( ) match tag { filter_fns true } } } } }
Generate the Dfill trait
Check the returned quote for detailed generated code
Generate the Dfill trait Check the returned quote for detailed generated code
&self
&self