derive_unaligned_struct

Function derive_unaligned_struct 

Source
pub(crate) fn derive_unaligned_struct(
    ast: &DeriveInput,
    strct: &DataStruct,
    zerocopy_crate: &Path,
) -> Result<TokenStream, Error>
Expand description

A struct is Unaligned if:

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