Expand description
Derive macros for bidirectional row β dataframe conversions.
Supports both structs (direct field mapping) and enums (field-name union
across variants with Option<T> fill for missing fields).
ModulesΒ§
- enum_
expansion π - Enum-specific DataFrame derive expansion.
StructsΒ§
- Auto
Expand πVecData - Data for
ResolvedField::AutoExpandVec. - Column
Registry π - Accumulates unique columns for an enum-to-dataframe unified schema.
- Data
Frame πAttrs - Parsed container-level
#[dataframe(...)]attributes. - Enum
Auto πExpand VecData - Data for
EnumResolvedField::AutoExpandVec. - Enum
Expanded πFixed Data - Data for
EnumResolvedField::ExpandedFixed. - Enum
Expanded πVecData - Data for
EnumResolvedField::ExpandedVec. - Enum
MapField πData - Data for
EnumResolvedField::Map. - Enum
Single πField Data - Data for
EnumResolvedField::Single. - Enum
Struct πField Data - Data for
EnumResolvedField::Struct. - Expanded
Fixed πData - Data for
ResolvedField::ExpandedFixed. - Expanded
VecData π - Data for
ResolvedField::ExpandedVec. - Field
Attrs π - Parsed field-level
#[dataframe(...)]attributes. - MapField
Data π - Data for
ResolvedField::Map(struct path, non-String-keyed maps, #919). - Resolved
Column π - A resolved column in the unified schema across all enum variants.
- Single
Field πData - Data for
ResolvedField::Single. - Struct
Field πData - Data for
ResolvedField::Struct. - Variant
Info π - Parsed and resolved information about a single enum variant for DataFrame codegen.
EnumsΒ§
- Enum
Resolved πField - A resolved enum field ready for codegen β either a single column or expanded from an array/Vec into multiple suffixed columns.
- Field
Type πKind - Classification of a field type for DataFrame column expansion.
- Resolved
Field π - A resolved struct field ready for codegen β determines how this field maps to DataFrame companion struct columns.
- Variant
Shape π - Describes the shape of an enum variantβs fields.
ConstantsΒ§
- READER_
SCALAR_ πNAMES - Scalar element types whose
Vec<T>(andVec<Option<T>>) round-trips throughTryFromSexpβ the supported field types for the parallel from-R reader (try_from_dataframe_par). This is intentionally narrower thanFieldTypeKind::Scalar: set/opaque collection types (HashSet<β¦>,BTreeSet<β¦>) also classify asScalarbut do NOT implementVec<_>: TryFromSexp, so they must be excluded from the reader path.
FunctionsΒ§
- classify_
field_ πtype - Classify a field type for DataFrame column expansion.
- derive_
dataframe_ row - Derive
DataFrameRow: generates a companion DataFrame type with collection fields. - derive_
struct_ πdataframe - Generate
DataFrameRowexpansion for struct types. - field_
is_ πborrowed_ ref - True if
tyis a borrowed reference (&[T],&[T; N],&str, β¦). Such expansion fields canβt be reconstructed by value in the RβRust reader. - field_
reader_ πcapable - True if a resolved struct field can be read back out of an R
data.frame. - generic_
type_ πarg_ count - Number of type arguments on
tyβs last path segment (0 when not angle-bracketed). RejectsHashMap<K, V, S>custom-hasher maps from the reader path β theVec<HashMap<String, V>>: TryFromSexpimpl only covers the default hasher. - is_
bare_ πreader_ scalar_ ty - True if
tyis a bare known-scalar ident (noOption, no generic args). - is_
reader_ πscalar_ ty - True if
tyis a bare known-scalar ident, orOption<bare-known-scalar>. - is_
string_ πty - True if
tyβs last path segment is the bare identString(path-identity check, same convention asclassify_field_type). - parse_
dataframe_ πattrs - Parse container-level
#[dataframe(...)]attributes from the derive input. - parse_
field_ πattrs - Parse field-level
#[dataframe(...)]attributes from asyn::Field. - resolve_
struct_ πfield - Resolve a struct field into a
ResolvedField, applying field attributes.