[−][src]Struct oxymcts::NodeMut
Node mutator.
Implementations
impl<'a, T> NodeMut<'a, T> where
T: 'a,
[src]
T: 'a,
pub fn id(&self) -> NodeId
[src]
Returns the ID of this node.
pub fn tree(&mut self) -> &mut Tree<T>
[src]
Returns the tree owning this node.
pub fn value(&mut self) -> &mut T
[src]
Returns the value 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 fn append_id(&mut self, new_child_id: NodeId) -> NodeMut<'_, T>
[src]
pub fn prepend_id(&mut self, new_child_id: NodeId) -> NodeMut<'_, T>
[src]
pub fn insert_id_before(&mut self, new_sibling_id: NodeId) -> NodeMut<'_, T>
[src]
Inserts a sibling before this node.
Panics
- Panics if
new_sibling_id
is not valid. - Panics if this node is an orphan.
pub fn insert_id_after(&mut self, new_sibling_id: NodeId) -> NodeMut<'_, T>
[src]
Inserts a sibling after this node.
Panics
- Panics if
new_sibling_id
is not valid. - Panics if this node is an orphan.
pub fn reparent_from_id_append(&mut self, from_id: NodeId)
[src]
Reparents the children of a node, appending them to this node.
Panics
Panics if from_id
is not valid.
pub fn reparent_from_id_prepend(&mut self, from_id: NodeId)
[src]
Reparents the children of a node, prepending them to this node.
Panics
Panics if from_id
is not valid.
Trait Implementations
impl<'a, T> Debug for NodeMut<'a, T> where
T: 'a + Debug,
[src]
T: 'a + Debug,
impl<'a, T> From<NodeMut<'a, T>> for NodeRef<'a, T> where
T: 'a,
[src]
T: 'a,
Auto Trait Implementations
impl<'a, T> RefUnwindSafe for NodeMut<'a, T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, T> Send for NodeMut<'a, T> where
T: Send,
T: Send,
impl<'a, T> Sync for NodeMut<'a, T> where
T: Sync,
T: Sync,
impl<'a, T> Unpin for NodeMut<'a, T>
impl<'a, T> !UnwindSafe for NodeMut<'a, T>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,