/// Constructs and returns a `ComponentTree` based at the component with url `root_url`,
/// consuming the builder. Returns an error if `root_url` or the url of any subsequent
/// child is not present in the builder's `decls_by_url` map, or if any `ComponentDecl`
/// in `decls_by_url` contains an invalid `ChildDecl`.
Constructs and returns a `ComponentTree` based at the component with url `root_url`,
consuming the builder.
Constructs and returns a ` ComponentTree ` based at the component with url ` root_url ` consuming the builder .
pub fn build<T: Into<String>>(mut self, root_url: T) -> BuildTreeResult {
        let mut tree = ComponentTree { nodes: HashMap::new() };
        let root_url = root_url.into();
        match self.decls_by_url.get(&root_url) {
            Some(root_decl) => {
                let mut root_node = ComponentNode::new(root_decl.clone(), root_url, None, None);
                self.add_descendants(&mut tree, &mut root_node);
                tree.nodes.insert(root_node.node_path.clone(), root_node);
                self.result.tree = Some(tree)
            }
            None => self
                .result
                .errors
                .push(ComponentTreeError::ComponentDeclNotFound(root_url, "".to_string())),
        }
        self.result
    }
pub fn build < T : Into < String > > ( mut self , root_url : T ) -> BuildTreeResult { let mut tree = ComponentTree { nodes : HashMap :: new ( ) } ; let root_url = root_url . into ( ) ; match self . decls_by_url . get ( & root_url ) { Some ( root_decl ) => { let mut root_node = ComponentNode :: new ( root_decl . clone ( ) , root_url , None , None ) ; self . add_descendants ( & mut tree , & mut root_node ) ; tree . nodes . insert ( root_node . node_path . clone ( ) , root_node ) ; self . result . tree = Some ( tree ) } None => self . result . errors . push ( ComponentTreeError :: ComponentDeclNotFound ( root_url , " " . to_string ( ) ) ) , } self . result }
Constructs and returns a `ComponentTree` based at the component with url `root_url`,
consuming the builder.
Constructs and returns a ` ComponentTree ` based at the component with url ` root_url ` consuming the builder .
mut self
root_url
T