pub fn next_with_edge(&mut self, tree: &Tree) -> Option<(NodeIndex, EdgeIndex)> {
        let ret = tree.parent(self.cur);
        if let Some((node, _)) = ret {
            self.cur = node;
        };
        ret
    }
/// Moves up the tree by following the first incoming edge.
///
/// This method behaves like an iterator, returning `Some(NodeIndex)` before reaching the final
/// state. Calling this method again in the final state will return `None`.
///
/// Returns a tuple of `(NodeIndex, EdgeIndex)` where `NodeIndex` is the parent node's index
/// and `EdgeIndex` is the incoming edge`s index.
Moves up the tree by following the first incoming edge.
This method behaves like an iterator, returning `Some(NodeIndex)` before reaching the final
state. Calling this method again in the final state will return `None`.


Moves up the tree by following the first incoming edge . This method behaves like an iterator returning ` Some ( NodeIndex ) ` before reaching the final state . Calling this method again in the final state will return ` None ` .
pub fn next_with_edge(&mut self, tree: &Tree) -> Option<(NodeIndex, EdgeIndex)> {
        let ret = tree.parent(self.cur);
        if let Some((node, _)) = ret {
            self.cur = node;
        };
        ret
    }
pub fn next_with_edge ( & mut self , tree : & Tree ) -> Option < ( NodeIndex , EdgeIndex ) > { let ret = tree . parent ( self . cur ) ; if let Some ( ( node , _ ) ) = ret { self . cur = node ; } ; ret }
Moves up the tree by following the first incoming edge.
Moves up the tree by following the first incoming edge .
&mut self
tree
&Tree
&mut self
tree
&Tree