derive_unaligned_union

Function derive_unaligned_union 

Source
pub(crate) fn derive_unaligned_union(
    ast: &DeriveInput,
    unn: &DataUnion,
    zerocopy_crate: &Path,
) -> Result<TokenStream, Error>
Expand description

Like structs, a union is Unaligned if:

  • repr(align) is no more than 1 and either
    • repr(C) or repr(transparent) and
      • all fields Unaligned
    • repr(packed)