rainbow_core/renderer/
mod.rs

1use std::collections::BTreeMap;
2
3#[cfg(feature = "html")]
4mod from_html;
5mod traits;
6use std::fmt::{Debug, Display};
7
8/// RenderNode
9#[derive(Clone, PartialEq)]
10pub enum RenderNode {
11    /// Root
12    Root(Vec<RenderNode>),
13    /// Text
14    Text(String),
15    /// Element
16    Element(Element),
17}
18
19/// Element
20#[derive(Clone, PartialEq)]
21pub struct Element {
22    pub name: Vec<String>,
23    pub attributes: BTreeMap<String, Option<String>>,
24    pub children: Vec<RenderNode>,
25}