derive_into_bytes_union

Function derive_into_bytes_union 

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

A union is IntoBytes if:

  • all fields are IntoBytes
  • repr(C), repr(transparent), or repr(packed)
  • no padding (size of union equals size of each field type)