Skip to main content

expand_struct

Function expand_struct 

Source
fn expand_struct(
    attr: TokenStream,
    item: TokenStream,
    item_struct: &ItemStruct,
) -> TokenStream
Expand description

Dispatches #[miniextendr] on a struct to the correct derive path.

Decision logic:

  • 1-field struct with no explicit mode: ALTREP (backwards compatibility)
  • Explicit list mode: IntoList + TryFromList + PreferList
  • Explicit dataframe mode: IntoList + DataFrameRow + companion IntoR
  • Default multi-field or explicit externalptr: ExternalPtr
  • prefer = "native": ExternalPtr + PreferRNative marker