Skip to main content

dioxus_core_template/
raw.rs

1/// A compact static tree of template structure.
2#[derive(Clone, Copy, PartialEq, Eq, Hash)]
3pub enum TemplateRawTree {
4    /// No template structure.
5    Empty,
6    /// A sequence of template trees.
7    Sequence(&'static [&'static TemplateRawTree]),
8    /// An element with static attributes and children.
9    Element {
10        /// Static tag name.
11        tag: &'static str,
12        /// Optional element namespace.
13        namespace: Option<&'static str>,
14        /// Static and dynamic attributes.
15        attrs: &'static TemplateRawTree,
16        /// Child nodes.
17        children: &'static TemplateRawTree,
18    },
19    /// A static attribute.
20    StaticAttr {
21        /// Static attribute name.
22        name: &'static str,
23        /// Static attribute value.
24        value: &'static str,
25        /// Optional attribute namespace.
26        namespace: Option<&'static str>,
27    },
28    /// A dynamic attribute slot.
29    DynamicAttr,
30    /// A static text node.
31    StaticText(&'static str),
32    /// A dynamic node slot.
33    DynamicNode,
34}