This commit is contained in:
Michael Mikovsky
2026-02-16 10:03:23 -07:00
parent ffde84e60c
commit 3e8c5dc994
9 changed files with 542 additions and 83 deletions
+5 -2
View File
@@ -1,9 +1,14 @@
//! Branch - A TreeElement with child elements for hierarchical routing.
use std::collections::HashMap;
use serde_json::{json, Value};
use crate::tree::symbols;
use crate::tree::TreeElement;
/// A branch node in the tree that can contain child elements.
/// Supports path-based routing for multi-hop communication (pivoting).
pub struct Branch {
children: HashMap<String, Box<dyn TreeElement>>,
branch_type: &'static str,
@@ -101,5 +106,3 @@ impl TreeElement for Branch {
self.handle_local_message(target, message)
}
}
use crate::tree::TreeElement;