Expand description
Parser and expansion for the typed_dataframe! macro.
Generates a struct that wraps an R data.frame, validates declared
columns via TryFromSexp, and exposes borrowed per-column accessors.
§Syntax
ⓘ
typed_dataframe! {
/// The shape we accept for the Theoph PK dataset.
pub TheophDf {
subject: i32,
weight: f64,
dose: f64,
flag: Option<i32>, // optional column
}
}Expands to a struct TheophDf with TryFromSexp and per-column
accessors (subject() -> &[i32], flag() -> Option<&[i32]>).
Structs§
- Typed
Dataframe Field - A single column declaration.
- Typed
Dataframe Input - Parsed input for
typed_dataframe!.
Functions§
- expand_
typed_ dataframe - Expand a parsed
typed_dataframe!into the generated struct, impls, and per-column accessors. - unwrap_
option 🔒 - If
tyisOption<T>, returnT; otherwiseNone.