Skip to main content

Crate plushie_core_macros

Crate plushie_core_macros 

Source
Expand description

Derive macros for Plushie widget development.

  • PlushieEnum: Make an enum usable as a widget property type. Variants become snake_case strings on the wire.

  • WidgetEvent: Declare widget events as an enum for typed emission via EventResult::emit_event().

  • WidgetCommand: Declare widget commands as an enum for typed construction via Command::widget().

  • WidgetProps: Define your widget’s properties as a struct and get typed extraction from the widget tree.

  • PlushieWidget: Generate type_names and fresh_for_session for simple stateless widgets.

  • widget!: Function-like macro for declaring a custom widget in a single invocation. Generates the struct, builder, From<_> for TreeNode conversion, and a build-time metadata const.

Macros§

widget
Declare a custom Plushie widget in one shot.

Derive Macros§

PlushieEnum
Make an enum usable as a widget property type.
PlushieWidget
Generate type_names and fresh_for_session for a PlushieWidget impl, and re-declare the impl block with those methods injected.
WidgetCommand
Typed command declarations for widget operations.
WidgetEvent
Typed event declarations for composite widgets.
WidgetProps
Define your widget’s properties and get typed extraction.