1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
use super::entry::Entry;
use super::entries::prelude::*;
#[derive(Default)]
pub struct Tree {
pub root: Root
}
impl Tree {
pub fn new() -> Self {
Self::default()
}
pub fn add_child(&mut self, child: Entry) {
self.root.add_child(child);
}
pub fn require(&mut self, requirement: Requirement) {
self.root.require(requirement);
}
/// Get XML description of the tree
pub fn get_xml(&self) -> String {
self.root.get_xml()
}
}