Struct ego_tree::NodeMut
[−]
[src]
pub struct NodeMut<'a, T: 'a> { /* fields omitted */ }
Node mutator.
Methods
impl<'a, T: 'a> NodeMut<'a, T>
[src]
pub fn value(&mut self) -> &mut T
[src]
Returns the value of this node.
pub fn tree(&mut self) -> &mut Tree<T>
[src]
Returns the tree containing this node.
pub fn id(&self) -> NodeId<T>
[src]
Returns the ID of this node.
pub fn parent(&mut self) -> Option<NodeMut<T>>
[src]
Returns the parent of this node.
pub fn prev_sibling(&mut self) -> Option<NodeMut<T>>
[src]
Returns the previous sibling of this node.
pub fn next_sibling(&mut self) -> Option<NodeMut<T>>
[src]
Returns the next sibling of this node.
pub fn first_child(&mut self) -> Option<NodeMut<T>>
[src]
Returns the first child of this node.
pub fn last_child(&mut self) -> Option<NodeMut<T>>
[src]
Returns the last child of this node.
pub fn has_siblings(&self) -> bool
[src]
Returns true if this node has siblings.
pub fn has_children(&self) -> bool
[src]
Returns true if this node has children.
pub fn append(&mut self, value: T) -> NodeMut<T>
[src]
Appends a new child to this node.
pub fn prepend(&mut self, value: T) -> NodeMut<T>
[src]
Prepends a new child to this node.
pub fn insert_before(&mut self, value: T) -> NodeMut<T>
[src]
pub fn insert_after(&mut self, value: T) -> NodeMut<T>
[src]
pub fn detach(&mut self)
[src]
Detaches this node from its parent.
pub unsafe fn append_id(&mut self, id: NodeId<T>) -> NodeMut<T>
[src]
Appends a child to this node.
pub unsafe fn prepend_id(&mut self, id: NodeId<T>) -> NodeMut<T>
[src]
Prepends a child to this node.
pub unsafe fn insert_id_before(&mut self, id: NodeId<T>) -> NodeMut<T>
[src]
pub unsafe fn insert_id_after(&mut self, id: NodeId<T>) -> NodeMut<T>
[src]
pub unsafe fn reparent_from_id_append(&mut self, id: NodeId<T>)
[src]
Reparents the children of a node, appending them to this node.
pub unsafe fn reparent_from_id_prepend(&mut self, id: NodeId<T>)
[src]
Reparents the children of a node, prepending them to this node.
Trait Implementations
impl<'a, T: Debug + 'a> Debug for NodeMut<'a, T>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more