Skip to main content

resolve_struct_field

Function resolve_struct_field 

Source
fn resolve_struct_field(
    field: &Field,
    index: usize,
    is_tuple: bool,
) -> Result<Option<ResolvedField>>
Expand description

Resolve a struct field into a ResolvedField, applying field attributes.

Combines the field’s #[dataframe(...)] attributes with its type classification to determine the codegen strategy:

  • skip -> returns None
  • as_list -> Single (suppresses expansion)
  • FixedArray -> ExpandedFixed (compile-time expansion to N columns)
  • VariableVec/BoxedSlice/BorrowedSlice + width -> ExpandedVec
  • VariableVec/BoxedSlice/BorrowedSlice + expand -> AutoExpandVec
  • Everything else -> Single

Returns Err if width or expand is used on an incompatible type.