Skip to main content

Module markers

Module markers 

Source
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 MacroMarker 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§

DataFramePayloadFields 👻
Reflection trait for #[derive(DataFrameRow)] types, used for compile-time collision detection in outer DataFrameRow enums.
DataFrameRow
Marker trait for types generated by #[derive(DataFrameRow)].
WidensToF64
Marker trait for types that can widen to f64 without loss.
WidensToI32
Marker trait for types that can widen to i32 without loss.

Functions§

assert_no_payload_field_collision 👻
Compile-time assertion: no element of fields equals discriminant_suffix (the inner-enum’s #[dataframe(tag)] value).
assert_no_sibling_field_collision 👻
Compile-time assertion: no element of sibling_cols matches concat!(base, "_", tag).
const_str_eq 🔒
Const-eval equality check for two &str values (stable since Rust 1.46).