[][src]Struct xtree::CursorMut

pub struct CursorMut<'a, T> { /* fields omitted */ }

A mutable Cursor can freely visit node in tree

Implementations

impl<'a, T> CursorMut<'a, T>[src]

pub fn move_child(&mut self, at: usize)[src]

Move this cursor to the specified child

Panics

Panics if 'at' >= children_count()

pub fn move_parent(&mut self)[src]

move this cursor to its parent. Do nothing if it is already in the root node.

pub fn move_root(&mut self)[src]

Move this cursor to its root. Do nothing if it is already in the root node.

pub fn current(&self) -> &'a mut T[src]

Return the reference to the current

pub fn children_count(&self) -> usize[src]

Get the count of children in current node

pub fn children(&self) -> ChildrenIterMut<'a, T>

Notable traits for ChildrenIterMut<'a, T>

impl<'a, T> Iterator for ChildrenIterMut<'a, T> type Item = &'a mut T;
[src]

Get a immutable children iterator

pub fn is_root(&self) -> bool[src]

Return true if current node is the root

pub fn is_leaf(&self) -> bool[src]

Return true if current node is a leaf

pub fn remove(self) -> Option<Tree<T>>[src]

Remove a sub-tree and consume the cursor
return None when current node is root

pub fn add_child(&mut self, tree: Tree<T>)[src]

Add a sub-tree to children of current node

Auto Trait Implementations

impl<'a, T> RefUnwindSafe for CursorMut<'a, T> where
    T: RefUnwindSafe
[src]

impl<'a, T> !Send for CursorMut<'a, T>[src]

impl<'a, T> !Sync for CursorMut<'a, T>[src]

impl<'a, T> Unpin for CursorMut<'a, T>[src]

impl<'a, T> UnwindSafe for CursorMut<'a, T> where
    T: RefUnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.