Struct maomi_tree::ForestNode
source · pub struct ForestNode<'a, T> { /* private fields */ }
Implementations§
source§impl<'a, T> ForestNode<'a, T>
impl<'a, T> ForestNode<'a, T>
sourcepub fn borrow<'b>(&self, target: &'b ForestNodeRc<T>) -> ForestNode<'b, T>
pub fn borrow<'b>(&self, target: &'b ForestNodeRc<T>) -> ForestNode<'b, T>
Borrow another node in the same forest.
sourcepub fn rc(&self) -> ForestNodeRc<T>
pub fn rc(&self) -> ForestNodeRc<T>
Get the ForestNodeRc
of current node.
sourcepub fn parent_rc(&self) -> Option<ForestNodeRc<T>>
pub fn parent_rc(&self) -> Option<ForestNodeRc<T>>
Get the parent node.
sourcepub fn first_child_rc(&self) -> Option<ForestNodeRc<T>>
pub fn first_child_rc(&self) -> Option<ForestNodeRc<T>>
Get the next sibling node.
sourcepub fn first_child(&self) -> Option<ForestNode<'a, T>>
pub fn first_child(&self) -> Option<ForestNode<'a, T>>
Get the first child node.
sourcepub fn last_child_rc(&self) -> Option<ForestNodeRc<T>>
pub fn last_child_rc(&self) -> Option<ForestNodeRc<T>>
Get the last child node.
sourcepub fn prev_sibling_rc(&self) -> Option<ForestNodeRc<T>>
pub fn prev_sibling_rc(&self) -> Option<ForestNodeRc<T>>
Get the previous sibling node.
sourcepub fn next_sibling_rc(&self) -> Option<ForestNodeRc<T>>
pub fn next_sibling_rc(&self) -> Option<ForestNodeRc<T>>
Get the next sibling node.
sourcepub fn next_sibling(&self) -> Option<ForestNode<'a, T>>
pub fn next_sibling(&self) -> Option<ForestNode<'a, T>>
Get the next sibling node.