pub struct NodeData<T>where
T: Display,{
pub value: T,
pub parent: Parent<T>,
pub children: Children<T>,
}Expand description
This struct holds underlying data. It shouldn’t be created directly, instead use:
NodeData.
- This library is inspired by r3bl-org work
NodeData
| | |
| | +- value: T ---------------------------------------+
| | |
| | Simple onwership of value
| |
| +-- parent: RwLock<WeakNodeNodeRef<T>> --------+
| |
| This describes a non-ownership relationship.
| When a node is dropped, its parent will not be dropped.
|
+---- children: RwLock<Vec<Child<T>>> ---+
|
This describes an ownership relationship.
When a node is dropped its children will be dropped as well.Fields§
§value: T§parent: Parent<T>§children: Children<T>Auto Trait Implementations§
impl<T> !Freeze for NodeData<T>
impl<T> RefUnwindSafe for NodeData<T>where
T: RefUnwindSafe,
impl<T> Send for NodeData<T>
impl<T> Sync for NodeData<T>
impl<T> Unpin for NodeData<T>where
T: Unpin,
impl<T> UnwindSafe for NodeData<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