pub struct GenTree<T> { /* private fields */ }Expand description
The GenTree struct represents a positional, linked-based general
tree structure that contains a pointer to the root node and the structure’s size.
The genericity of the struct means you’ll have to explicitly type the
tree at instantiation.
Most of the major accessors and mutators appear on the CursorMut struct.
Example:
// Creates a tree over Heading objects
let mut tree: GenTree<Heading> = GenTree::<Heading>::new();
// Creates a CursorMut to navigate/mutate the tree,
// starting at the root node
let mut cursor = tree.cursor_mut();Implementations§
Source§impl<T> GenTree<T>
impl<T> GenTree<T>
Sourcepub fn cursor_mut(&mut self) -> CursorMut<'_, T>
pub fn cursor_mut(&mut self) -> CursorMut<'_, T>
Creates a CursorMut starting at the tree’s root.
Sourcepub fn cursor_from(&mut self, position: Position<T>) -> CursorMut<'_, T>
pub fn cursor_from(&mut self, position: Position<T>) -> CursorMut<'_, T>
Creates a CursorMut from a given Position.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for GenTree<T>
impl<T> !RefUnwindSafe for GenTree<T>
impl<T> !Send for GenTree<T>
impl<T> !Sync for GenTree<T>
impl<T> Unpin for GenTree<T>
impl<T> !UnwindSafe for GenTree<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more