Struct k::Node [−][src]
pub struct Node<T>(_);
Graph Node, which has a parent and children
Methods
impl<T> Node<T>
[src]
impl<T> Node<T>
pub fn new(obj: T) -> Self
[src]
pub fn new(obj: T) -> Self
pub fn borrow<'a>(&'a self) -> Ref<'a, NodeImpl<T>>
[src]
pub fn borrow<'a>(&'a self) -> Ref<'a, NodeImpl<T>>
pub fn borrow_mut<'a>(&'a self) -> RefMut<'a, NodeImpl<T>>
[src]
pub fn borrow_mut<'a>(&'a self) -> RefMut<'a, NodeImpl<T>>
pub fn iter_ancestors(&self) -> Ancestors<T>
[src]
pub fn iter_ancestors(&self) -> Ancestors<T>
iter from the end to root, it contains nodes[id] itsself
pub fn iter_descendants(&self) -> Descendants<T>
[src]
pub fn iter_descendants(&self) -> Descendants<T>
iter to the end, it contains nodes[id] itsself
pub fn set_parent(&self, parent: &Node<T>)
[src]
pub fn set_parent(&self, parent: &Node<T>)
Set parent and child relations at same time
Trait Implementations
impl<T: Debug> Debug for Node<T>
[src]
impl<T: Debug> Debug for Node<T>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<T> Clone for Node<T>
[src]
impl<T> Clone for Node<T>