Skip to main content

generate_split_method

Function generate_split_method 

Source
fn generate_split_method(
    row_name: &Ident,
    variant_infos: &[VariantInfo],
    impl_generics: &ImplGenerics<'_>,
    ty_generics: &TypeGenerics<'_>,
    where_clause: Option<&WhereClause>,
) -> TokenStream
Expand description

Generate the split representation for an enum DataFrameRow: the hidden to_dataframe_split associated method (body holder) plus the DataFrameRowSplit bridge impl that surfaces the public rows.into_dataframe_split() verb (IntoDataFrameSplit).

Returns a DataFrameShape whose partitions are rooted BuiltDataFrames (#1750): Bare for a single-variant enum, PerVariantList (one entry per variant, named with the snake_case variant name) otherwise. Each partition data.frame has only that variant’s columns (non-optional types — no NA fill from other variants).