pub struct Node<T> {
pub idx: usize,
pub value: T,
pub parent: Option<usize>,
pub children: Vec<usize>,
}
Expand description
An index based n-ary tree node.
Fields§
§idx: usize
Index of this node.
value: T
Contained value of this node.
parent: Option<usize>
§children: Vec<usize>
The indices of this node’s children.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Node<T>where
T: Freeze,
impl<T> RefUnwindSafe for Node<T>where
T: RefUnwindSafe,
impl<T> Send for Node<T>where
T: Send,
impl<T> Sync for Node<T>where
T: Sync,
impl<T> Unpin for Node<T>where
T: Unpin,
impl<T> UnwindSafe for Node<T>where
T: UnwindSafe,
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