[−][src]Macro rdxl::xrender
xrender!() { /* proc-macro */ }
The xrender! macro defines a Display implementation for a type
xrender! implements the Display property for XHtml-like types. The type definition is separate from the display logic for in the case that a separate backend is desired
A typical invocation would look like this:
xrender!(MyList, <ul> <li>{{ self.my_string }}</li> <li>{{ self.my_int }}</li> {{ for i in self.children.iter() {{ {{ if let MyListChildren::MyItem(my_item) = i {{ <li>MyItem: {{ my_item.my_bool }}</li> }} else if let MyListChildren::MyOtherItem(my_other_item) = i {{ <li>MyOtherItem: {{ my_other_item.my_char }}</li> }} }} }} }} </ul>);