fn generate_assert_no_padding(
input: &DeriveInput,
enum_variant: Option<&Variant>,
for_trait: &str,
) -> Result<TokenStream>Expand description
Check that a struct or enum has no padding by asserting that the size of the type is equal to the sum of the size of it’s fields and discriminant (for enums, this must be asserted for each variant).