pub struct GraphNode {
pub id: NodeId,
pub node_type: NodeType,
pub parent_id: Option<NodeId>,
pub children: Vec<NodeId>,
pub depth: u32,
pub weight: f32,
pub category: String,
pub memory_lane_type: Option<String>,
}Expand description
Graph tree node representing a memory or category
Fields§
§id: NodeIdUnique node identifier (memory ID or category node ID)
node_type: NodeTypeNode type
parent_id: Option<NodeId>Parent node ID (None for root)
children: Vec<NodeId>Child node IDs
depth: u32Depth in tree (0 for root)
weight: f32Node weight for relevance boosting
category: StringCategory this node belongs to
memory_lane_type: Option<String>Optional memory lane type
Implementations§
Source§impl GraphNode
impl GraphNode
Sourcepub fn remove_child(&mut self, child_id: NodeId) -> bool
pub fn remove_child(&mut self, child_id: NodeId) -> bool
Remove a child node
Sourcepub fn set_priority_weight(&mut self, priority: u8)
pub fn set_priority_weight(&mut self, priority: u8)
Set weight based on priority level
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GraphNode
impl<'de> Deserialize<'de> for GraphNode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for GraphNode
impl RefUnwindSafe for GraphNode
impl Send for GraphNode
impl Sync for GraphNode
impl Unpin for GraphNode
impl UnsafeUnpin for GraphNode
impl UnwindSafe for GraphNode
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