pub struct ReadSnapshot { /* private fields */ }Implementations§
Source§impl ReadSnapshot
impl ReadSnapshot
Sourcepub fn open_nodes(&self, names: &[String]) -> KnowledgeGraphOut
pub fn open_nodes(&self, names: &[String]) -> KnowledgeGraphOut
Open named entities + incident relations.
Sourcepub fn read_graph(&self) -> KnowledgeGraphOut
pub fn read_graph(&self) -> KnowledgeGraphOut
Full graph read. Returns all entities and relations.
Sourcepub fn get_entity(&self, name: &str) -> Option<Entity>
pub fn get_entity(&self, name: &str) -> Option<Entity>
Get a single entity by name.
Sourcepub fn neighbors(
&self,
name: &str,
direction: Direction,
rtype: Option<&str>,
depth: u32,
) -> Result<KnowledgeGraphOut>
pub fn neighbors( &self, name: &str, direction: Direction, rtype: Option<&str>, depth: u32, ) -> Result<KnowledgeGraphOut>
Neighborhood expansion (same logic as KnowledgeGraph::neighbors but read-only).
Sourcepub fn describe_entity(&self, name: &str) -> Result<Value>
pub fn describe_entity(&self, name: &str) -> Result<Value>
Describe an entity: entity details, incident relations, neighbors, degree.
Sourcepub fn find_path(&self, from: &str, to: &str) -> Result<Vec<String>>
pub fn find_path(&self, from: &str, to: &str) -> Result<Vec<String>>
Find the shortest path between two entities.
Sourcepub fn extract_subgraph(
&self,
names: &[String],
depth: u32,
) -> Result<KnowledgeGraphOut>
pub fn extract_subgraph( &self, names: &[String], depth: u32, ) -> Result<KnowledgeGraphOut>
Extract a subgraph around the given entities.
Sourcepub fn graph_stats(&self) -> Value
pub fn graph_stats(&self) -> Value
Graph statistics.
Sourcepub fn search_relations(
&self,
from: Option<&str>,
to: Option<&str>,
rtype: Option<&str>,
) -> Vec<Relation>
pub fn search_relations( &self, from: Option<&str>, to: Option<&str>, rtype: Option<&str>, ) -> Vec<Relation>
Search relations by from/to/type filters.
Sourcepub fn entity_type_counts(&self) -> Vec<(String, usize)>
pub fn entity_type_counts(&self) -> Vec<(String, usize)>
Count entities per type.
Sourcepub fn relation_type_counts(&self) -> Vec<(String, usize)>
pub fn relation_type_counts(&self) -> Vec<(String, usize)>
Count relations per type.
Trait Implementations§
Source§impl Clone for ReadSnapshot
impl Clone for ReadSnapshot
Source§fn clone(&self) -> ReadSnapshot
fn clone(&self) -> ReadSnapshot
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ReadSnapshot
impl RefUnwindSafe for ReadSnapshot
impl Send for ReadSnapshot
impl Sync for ReadSnapshot
impl Unpin for ReadSnapshot
impl UnsafeUnpin for ReadSnapshot
impl UnwindSafe for ReadSnapshot
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