fn generate_altrep_len(
name: &Ident,
generics: &Generics,
len_field: &Ident,
) -> TokenStreamExpand description
Generates an impl AltrepLen for T block that delegates to a named struct field.
The generated implementation returns self.{len_field} cast to usize as the
ALTREP vector length.
ยงArguments
nameโ The struct identifier.genericsโ Generic parameters for the struct.len_fieldโ The identifier of the field that holds the length value.