pub fn bitfield_unit(ctx: &BindgenContext, layout: Layout) -> quote::Tokens {
    let mut tokens = quote! {};

    if ctx.options().enable_cxx_namespaces {
        tokens.append(quote! { root:: });
    }

    let align = match layout.align {
        n if n >= 8 => quote! { u64 },
        4 => quote! { u32 },
        2 => quote! { u16 },
        _ => quote! { u8  },
    };

    let size = layout.size;
    tokens.append(quote! {
        __BindgenBitfieldUnit<[u8; #size], #align>
    });

    tokens
}
/// Generates a bitfield allocation unit type for a type with the given `Layout`.
Generates a bitfield allocation unit type for a type with the given `Layout`.
Generates a bitfield allocation unit type for a type with the given ` Layout ` .
pub fn bitfield_unit(ctx: &BindgenContext, layout: Layout) -> quote::Tokens {
    let mut tokens = quote! {};
    if ctx.options().enable_cxx_namespaces {
        tokens.append(quote! { root:: });
    }
    let align = match layout.align {
        n if n >= 8 => quote! { u64 },
        4 => quote! { u32 },
        2 => quote! { u16 },
        _ => quote! { u8  },
    };
    let size = layout.size;
    tokens.append(quote! {
        __BindgenBitfieldUnit<[u8; #size], #align>
    });
    tokens
}
pub fn bitfield_unit ( ctx : & BindgenContext , layout : Layout ) -> quote :: Tokens { let mut tokens = quote ! { } ; if ctx . options ( ) . enable_cxx_namespaces { tokens . append ( quote ! { root } ) ; } let align = match layout . align { n if n >= 8 => quote ! { u64 } , 4 => quote ! { u32 } , 2 => quote ! { u16 } , _ => quote ! { u8 } , } ; let size = layout . size ; tokens . append ( quote ! { __BindgenBitfieldUnit [ u8 size ] align } ) ; tokens }
Generates a bitfield allocation unit type for a type with the given `Layout`.
Generates a bitfield allocation unit type for a type with the given ` Layout ` .
ctx
&BindgenContext
layout
Layout
ctx
&BindgenContext
layout
Layout