Expand description
Dispatch #[miniextendr] on structs and enums to the appropriate derive helpers.
This module handles #[miniextendr] when applied to structs or enums (not functions,
impl blocks, or traits). It dispatches to the correct derive helper based on:
- Item shape (structs โ ExternalPtr, fieldless enums โ RFactor by default)
- Explicit mode attributes (
list,dataframe,externalptr,match_arg,factor) - Preference markers (
prefer = "...")
ยงDisambiguation table
| Syntax | Result |
|---|---|
#[miniextendr] / #[miniextendr(externalptr)] on struct | ExternalPtr |
#[miniextendr(list)] on struct | IntoList + TryFromList + PreferList |
#[miniextendr(dataframe)] on struct | DataFrameRow (companion has IntoR) |
#[miniextendr(prefer = "list" / "dataframe" / "externalptr")] on struct | Same as the explicit mode |
#[miniextendr(prefer = "native")] on struct | ExternalPtr without its IntoR + PreferRNativeType |
#[miniextendr(class = "...", base = "...")] on struct | Error: use an ALTREP derive |
#[miniextendr] on fieldless enum | RFactor |
#[miniextendr(match_arg)] on fieldless enum | MatchArg |
Structsยง
- Struct
Enum ๐Attrs - Parsed attributes for
#[miniextendr]on structs/enums.
Functionsยง
- expand_
enum ๐ - Dispatches
#[miniextendr]on a fieldless enum to the correct derive path. - expand_
struct ๐ - Dispatches
#[miniextendr]on a struct to the correct derive path. - expand_
struct_ or_ enum - Main dispatch entry point for
#[miniextendr]on a struct or enum. - is_
fieldless_ ๐enum - Returns
trueif every variant of the enum is a unit variant (no fields). - parse_
attrs ๐ - Parses the attribute arguments of
#[miniextendr(...)]when applied to a struct or enum. - strip_
miniextendr_ ๐attrs - Strip
#[miniextendr(...)]attributes from a DeriveInput.