/// Generates the actual item struct definition for the `#[bitfield]`.
///
/// Internally it only contains a byte array equal to the minimum required
/// amount of bytes to compactly store the information of all its bit fields.
Generates the actual item struct definition for the `#[bitfield]`.
Internally it only contains a byte array equal to the minimum required
amount of bytes to compactly store the information of all its bit fields.
Generates the actual item struct definition for the ` # [ bitfield ] ` . Internally it only contains a byte array equal to the minimum required amount of bytes to compactly store the information of all its bit fields .
fn generate_struct_unpacked(&self, config: &Config) -> TokenStream2 {
        let span = self.item_struct.span();
        let attrs = &config.retained_attributes;
        let vis = &self.item_struct.vis;
        let ident = &self.item_struct.ident;
        let bits_checks = self
            .field_infos(config)
            .map(|field_info| self.expand_bits_checks_for_field(field_info));
        let fields_true = self.field_infos(config)
            .filter(|f_info| !f_info.config.skip_all())
            .map(|field_info| {
                self.expand_field_unpacked(field_info)
            });
        quote_spanned!(span=>
            #( #attrs )*
            #[allow(clippy::identity_op)]
            #vis struct #ident
            {
                #( #fields_true )*
            }
            const _: () = {
                #( #bits_checks )*
            };
        )
    }
fn generate_struct_unpacked ( & self , config : & Config ) -> TokenStream2 { let span = self . item_struct . span ( ) ; let attrs = & config . retained_attributes ; let vis = & self . item_struct . vis ; let ident = & self . item_struct . ident ; let bits_checks = self . field_infos ( config ) . map ( | field_info | self . expand_bits_checks_for_field ( field_info ) ) ; let fields_true = self . field_infos ( config ) . filter ( | f_info | ! f_info . config . skip_all ( ) ) . map ( | field_info | { self . expand_field_unpacked ( field_info ) } ) ; quote_spanned ! ( span ( attrs ) [ allow ( clippy identity_op ) ] vis struct ident { ( fields_true ) } const ( ) { ( bits_checks ) } ) }
Generates the actual item struct definition for the `#[bitfield]`.
Generates the actual item struct definition for the ` # [ bitfield ] ` .
&self
config
&Config