pub fn push_tree(root: &NodePtr<T>, tree: NodePtr<T>) -> NodePtr<T> {
        tree.borrow_mut().parent = Some(Rc::downgrade(root));
        root.borrow_mut().siblings.push(tree);
        root.borrow().siblings.last().unwrap().clone()
    }
/// Pushes node as a subnode for specified root node.
///
/// Changes node's parent to be root, and pushes node to list of
/// root's subnodes.
///
/// # Examples
///
/// ```
/// let root = Tree::new(0);
/// let one = Tree::new(1);
///
/// Tree::push_tree(&root, one);
///
/// assert_eq!(root, Tree::get_parent(&Tree::push_tree(&Tree::new(0), 1)).unwrap());
/// ```
///
Pushes node as a subnode for specified root node.
Changes node's parent to be root, and pushes node to list of
root's subnodes.
Pushes node as a subnode for specified root node . Changes node ' s parent to be root and pushes node to list of root ' s subnodes .
pub fn push_tree(root: &NodePtr<T>, tree: NodePtr<T>) -> NodePtr<T> {
        tree.borrow_mut().parent = Some(Rc::downgrade(root));
        root.borrow_mut().siblings.push(tree);
        root.borrow().siblings.last().unwrap().clone()
    }
pub fn push_tree ( root : & NodePtr < T > , tree : NodePtr < T > ) -> NodePtr < T > { tree . borrow_mut ( ) . parent = Some ( Rc :: downgrade ( root ) ) ; root . borrow_mut ( ) . siblings . push ( tree ) ; root . borrow ( ) . siblings . last ( ) . unwrap ( ) . clone ( ) }
Pushes node as a subnode for specified root node.
Pushes node as a subnode for specified root node .
root
&NodePtr<T>
tree
NodePtr<T>
examples
None