pub(crate) fn generate_per_field_offsets<'a>(
fields: &[FieldInfo<'a>],
fields_are_asule: bool,
per_field_code: impl FnMut(&FieldInfo<'a>, &Ident, &Ident) -> TokenStream,
) -> (TokenStream, Ident)
Expand description
Given an iterator over ULE or AsULE struct fields, returns code that calculates field sizes and generates a line of code per field based on the per_field_code function (whose parameters are the field, the identifier of the const for the previous offset, the identifier for the const for the next offset, and the field index)