Expand description
Marker traits for proc-macro derived types. Marker traits for proc-macro derived types.
These marker traits identify types that have been derived with specific proc-macros. They enable compile-time type checking and blanket implementations.
§Pattern
Each derive macro generates an impl of its corresponding marker trait:
| Derive Macro | Marker Trait |
|---|---|
#[derive(DataFrameRow)] | DataFrameRow |
The Prefer* derives (PreferList / PreferDataFrame / PreferExternalPtr /
PreferRNativeType) emit their IntoR impl directly and carry no companion marker
trait — a type-level representation default is just “which IntoR impl the derive wrote”,
not a tag anything dispatches on. (Four marker-keyed IntoR blankets would mutually
overlap under coherence anyway, so the markers could never become load-bearing.)
Traits§
- Data
Frame 👻Payload Fields - Reflection trait for
#[derive(DataFrameRow)]types, used for compile-time collision detection in outerDataFrameRowenums. - Data
Frame Row - Marker trait for types generated by
#[derive(DataFrameRow)]. - Widens
ToF64 - Marker trait for types that can widen to
f64without loss. - Widens
ToI32 - Marker trait for types that can widen to
i32without loss.
Functions§
- assert_
no_ 👻payload_ field_ collision - Compile-time assertion: no element of
fieldsequalsdiscriminant_suffix(the inner-enum’s#[dataframe(tag)]value). - assert_
no_ 👻sibling_ field_ collision - Compile-time assertion: no element of
sibling_colsmatchesconcat!(base, "_", tag). - const_
str_ 🔒eq - Const-eval equality check for two
&strvalues (stable since Rust 1.46).