Skip to main content

expand_struct_or_enum

Function expand_struct_or_enum 

Source
pub fn expand_struct_or_enum(
    attr: TokenStream,
    item: TokenStream,
) -> TokenStream
Expand description

Main dispatch entry point for #[miniextendr] on a struct or enum.

Attempts to parse the item as a struct first, then as an enum. Dispatches to the appropriate derive path based on the parsed attributes and item shape (field count, variant structure).

Returns the original item plus any generated trait implementations as a combined token stream.