pub struct Node<T>{
    pub id: usize,
    pub parent_id: Option<usize>,
    pub children_ids: VecDeque<usize>,
    pub payload: T,
}Expand description
This struct represents a node in a tree. It may have a parent. It can hold multiple children.
And it has a payload. It also has an id that uniquely identifies it. An Arena or
[super::MTArena] is used to hold nodes.
Fields§
§id: usize§parent_id: Option<usize>§children_ids: VecDeque<usize>§payload: TTrait 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>
impl<T> Sync for Node<T>
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