pub struct MemoryGraphStore { /* private fields */ }Implementations§
Trait Implementations§
Source§impl Default for MemoryGraphStore
impl Default for MemoryGraphStore
Source§impl GraphStore for MemoryGraphStore
impl GraphStore for MemoryGraphStore
fn add_node(&self, node: Node) -> Result<()>
fn add_edge(&self, edge: Edge) -> Result<()>
fn get_node(&self, id: &str) -> Result<Option<Node>>
fn get_all_nodes(&self) -> Result<Vec<Node>>
fn get_all_edges(&self) -> Result<Vec<Edge>>
fn neighbors( &self, id: &str, relation_filter: Option<&str>, ) -> Result<Vec<(Node, Edge)>>
fn search(&self, query: &str, top_k: usize) -> Result<Vec<(f64, Node)>>
fn shortest_path(&self, src: &str, tgt: &str) -> Result<Option<Vec<Node>>>
fn dijkstra_shortest_path( &self, src: &str, tgt: &str, ) -> Result<Option<Vec<Node>>>
fn subgraph(&self, node_ids: &[&str]) -> Result<(Vec<Node>, Vec<Edge>)>
fn node_count(&self) -> Result<usize>
fn edge_count(&self) -> Result<usize>
fn remove_node(&self, id: &str) -> Result<()>
fn remove_edge(&self, source: &str, target: &str, relation: &str) -> Result<()>
fn clear(&self) -> Result<()>
Auto Trait Implementations§
impl !Freeze for MemoryGraphStore
impl RefUnwindSafe for MemoryGraphStore
impl Send for MemoryGraphStore
impl Sync for MemoryGraphStore
impl Unpin for MemoryGraphStore
impl UnsafeUnpin for MemoryGraphStore
impl UnwindSafe for MemoryGraphStore
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more