Skip to main content

register_widget

Function register_widget 

Source
pub fn register_widget<W: Widget>()
Expand description

Register W: the lumenc HTML parser accepts <tag ...> for its Widget::parser_tag, and every element spawned for that tag is handed, with its authored attributes, to Widget::spawn.

Called by Widget derive output (<Type>::register(), which the generated plugin’s build calls) at app startup, before the parser runs. Registering again is a no-op; a second widget registered for the same tag replaces the first.