Expand description
Enum-specific DataFrame derive expansion.
Generates a companion struct where every column is Vec<Option<T>>, with
None fill for fields absent in a given variant.
Functionsยง
- build_
enum_ ๐reader - Build the
try_from_dataframe/try_from_dataframe_parmethods for a tagged enum. - derive_
enum_ ๐dataframe - Derive
DataFrameRowfor an enum with#[dataframe(align)]. - enum_
elem_ ๐idents - The variables an expanded fieldโs elements are bound to, for the field at
posin its variant: by position, since all of a variantโs fields are bound before any column is filled. - enum_
field_ ๐reader_ capable - Check whether an enum field is reader-capable.
- enum_
reader_ ๐field_ value - The value of field
erfin row__iof variantvariant_name_str, read from the readerโs extracted columns. Withtake, each cell is moved out of its column: the sequential reader owns the columns and visits each row once. Without it, the cell is cloned: the parallel reader shares the columns across threads, and reads only scalar columns, which are allClone. - expanded_
elem_ ๐prelude - Bind the elements of variant
viโs[T; N]/width = Nfields to the variablesenum_elem_identsnames, for a match arm whose pattern binds each field to itsbinding. - generate_
split_ ๐method - Generate the split representation for an enum
DataFrameRow: the hiddento_dataframe_splitassociated method (body holder) plus theDataFrameRowSplitbridge impl that surfaces the publicrows.into_dataframe_split()verb (IntoDataFrameSplit). - option_
scalar_ ๐in_ variant_ error - Error for an
Option<scalar>field inside an enum variant (#1437). - raw_
variant_ ๐column_ error - Reject
u8in every variant-field shape that reaches a column: a scalar orOption<u8>, a fixed array, or awidth/expand(padded) slice. Variant columns are NA in rows of the other variants, and R raw vectors have no NA. A plainVec<u8>stays an opaque list-column and is accepted.