/// 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(&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 size = self.generate_target_or_actual_bitfield_size(config);
        let next_divisible_by_8 = Self::next_divisible_by_8(&size);
        quote_spanned!(span=>
            #( #attrs )*
            #[allow(clippy::identity_op)]
            #vis struct #ident
            {
                bytes: [::core::primitive::u8; #next_divisible_by_8 / 8usize],
            }
        )
    }
fn generate_struct ( & 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 size = self . generate_target_or_actual_bitfield_size ( config ) ; let next_divisible_by_8 = Self :: next_divisible_by_8 ( & size ) ; quote_spanned ! ( span ( attrs ) [ allow ( clippy identity_op ) ] vis struct ident { bytes [ core primitive u8 next_divisible_by_8 8usize ] } ) }
Generates the actual item struct definition for the `#[bitfield]`.
Generates the actual item struct definition for the ` # [ bitfield ] ` .
&self
config
&Config