Skip to main content

register_widget_tag_owned

Function register_widget_tag_owned 

Source
pub fn register_widget_tag_owned(tag: &str)
Expand description

Register a tag whose name is only known at run time, so <tag ...> markup is accepted.

The derive knows its tag at compile time and passes a &'static str; a name read out of a file does not exist until the file is read. This takes the name by reference, checks the set first, and leaks the string only when the tag is new - a bounded, once-per-tag cost, because the registry outlives every caller and the parser consults it for the life of the process.