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, PreferExternalPtr, PreferRNativeType,
and the feature-gated PreferVctrs) emit their IntoR impl directly and carry
no companion marker trait. A type’s representation default is its IntoR
impl; multiple marker-keyed blankets would overlap under coherence.
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).