derive_into_bytes_enum

Function derive_into_bytes_enum 

Source
pub(crate) fn derive_into_bytes_enum(
    ast: &DeriveInput,
    enm: &DataEnum,
    zerocopy_crate: &Path,
) -> Result<TokenStream, Error>
Expand description

If the type is an enum:

  • It must have a defined representation (reprs C, u8, u16, u32, u64, usize, i8, i16, i32, i64, or isize).
  • It must have no padding bytes.
  • Its fields must be IntoBytes.