pub struct Cursor<'a, T> { /* private fields */ }Expand description
Cursor over the tree elements.
If a move operation fails we Return a result with:
Ok: the moved cursorErr: the previous unmodified cursor
Implementations
sourceimpl<T> Cursor<'_, T>
impl<T> Cursor<'_, T>
pub fn get(&self) -> &T
pub fn get_mut(&mut self) -> &mut T
pub fn parent(&mut self) -> Result<&mut Self, &mut Self>
pub fn first_child(&mut self) -> Result<&mut Self, &mut Self>
pub fn last_child(&mut self) -> Result<&mut Self, &mut Self>
pub fn next_sibling(&mut self) -> Result<&mut Self, &mut Self>
pub fn prev_sibling(&mut self) -> Result<&mut Self, &mut Self>
pub fn move_next(&mut self) -> Result<&mut Self, &mut Self>
pub fn append_child(&mut self, value: T) -> NodeId
pub fn append_sibling(&mut self, value: T) -> NodeId
Trait Implementations
Auto Trait Implementations
impl<'a, T> RefUnwindSafe for Cursor<'a, T> where
T: RefUnwindSafe,
impl<'a, T> Send for Cursor<'a, T> where
T: Send,
impl<'a, T> Sync for Cursor<'a, T> where
T: Sync,
impl<'a, T> Unpin for Cursor<'a, T>
impl<'a, T> !UnwindSafe for Cursor<'a, T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more