mathml_rs/structs/root.rs
1use super::math_node::NodeIndex;
2use std::fmt;
3
4#[derive(Default, Debug, Clone, Eq, PartialEq)]
5pub struct Root {
6 pub children: Vec<NodeIndex>,
7 pub parent: Option<NodeIndex>,
8}
9
10impl fmt::Display for Root {
11 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
12 write!(
13 f,
14 "children: {:?}, parent: {:?}",
15 self.children, self.parent
16 )
17 }
18}