pub struct SimpleKnowledgeGraph {
pub nodes: HashMap<String, KnowledgeNode>,
pub edges: Vec<(String, String)>,
}Expand description
Simple in-memory knowledge graph for testing
Fields§
§nodes: HashMap<String, KnowledgeNode>§edges: Vec<(String, String)>Implementations§
Trait Implementations§
Source§impl Clone for SimpleKnowledgeGraph
impl Clone for SimpleKnowledgeGraph
Source§fn clone(&self) -> SimpleKnowledgeGraph
fn clone(&self) -> SimpleKnowledgeGraph
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SimpleKnowledgeGraph
impl Debug for SimpleKnowledgeGraph
Source§impl Default for SimpleKnowledgeGraph
impl Default for SimpleKnowledgeGraph
Source§fn default() -> SimpleKnowledgeGraph
fn default() -> SimpleKnowledgeGraph
Returns the “default value” for a type. Read more
Source§impl KnowledgeGraph for SimpleKnowledgeGraph
impl KnowledgeGraph for SimpleKnowledgeGraph
Source§fn get_knowledge_mut(&mut self, node_id: &str) -> Option<&mut KnowledgeNode>
fn get_knowledge_mut(&mut self, node_id: &str) -> Option<&mut KnowledgeNode>
Get mutable access to a node’s knowledge storage
Source§fn get_knowledge(&self, node_id: &str) -> Option<&KnowledgeNode>
fn get_knowledge(&self, node_id: &str) -> Option<&KnowledgeNode>
Get read access to a node’s knowledge storage
Source§impl KnowledgeManagement for SimpleKnowledgeGraph
impl KnowledgeManagement for SimpleKnowledgeGraph
Source§fn store_finding(&mut self, node_id: &str, key: &str, value: &str) -> Result<()>
fn store_finding(&mut self, node_id: &str, key: &str, value: &str) -> Result<()>
Store a finding in a node
Source§fn get_finding(&self, node_id: &str, key: &str) -> Option<String>
fn get_finding(&self, node_id: &str, key: &str) -> Option<String>
Get a finding from a node or any upstream node
Source§fn get_upstream_findings(&self, node_id: &str, key: &str) -> Option<String>
fn get_upstream_findings(&self, node_id: &str, key: &str) -> Option<String>
Get finding from upstream nodes recursively
Source§fn cache_file(&mut self, node_id: &str, path: &str, content: &str) -> Result<()>
fn cache_file(&mut self, node_id: &str, path: &str, content: &str) -> Result<()>
Cache file content in a node
Source§fn get_cached_file(&self, node_id: &str, path: &str) -> Option<String>
fn get_cached_file(&self, node_id: &str, path: &str) -> Option<String>
Get cached file from this node or upstream
Source§fn record_tool_call(
&mut self,
node_id: &str,
tool_name: &str,
summary: &str,
) -> Result<()>
fn record_tool_call( &mut self, node_id: &str, tool_name: &str, summary: &str, ) -> Result<()>
Record a tool call
Source§fn get_tool_history(&self, node_id: &str) -> Vec<ToolCallRecord>
fn get_tool_history(&self, node_id: &str) -> Vec<ToolCallRecord>
Get all tool calls from this and upstream nodes
Source§fn get_knowledge_context(&self, node_id: &str) -> String
fn get_knowledge_context(&self, node_id: &str) -> String
Get all findings from this and upstream nodes as formatted context
Auto Trait Implementations§
impl Freeze for SimpleKnowledgeGraph
impl RefUnwindSafe for SimpleKnowledgeGraph
impl Send for SimpleKnowledgeGraph
impl Sync for SimpleKnowledgeGraph
impl Unpin for SimpleKnowledgeGraph
impl UnsafeUnpin for SimpleKnowledgeGraph
impl UnwindSafe for SimpleKnowledgeGraph
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