pub trait GraphView: Send + Sync {
// Required methods
fn neighbors(
&self,
node_id: &str,
direction: GraphDirection,
max_depth: usize,
) -> Result<Vec<GraphEdge>, MemoryError>;
fn path(
&self,
from: &str,
to: &str,
max_depth: usize,
) -> Result<Option<Vec<String>>, MemoryError>;
}Expand description
Trait for querying the memory store as a graph.
Required Methods§
Sourcefn neighbors(
&self,
node_id: &str,
direction: GraphDirection,
max_depth: usize,
) -> Result<Vec<GraphEdge>, MemoryError>
fn neighbors( &self, node_id: &str, direction: GraphDirection, max_depth: usize, ) -> Result<Vec<GraphEdge>, MemoryError>
Find neighboring nodes up to max_depth hops away.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".