pub struct GraphStore { /* private fields */ }
Expand description
In-memory graph store for code intelligence
Implementations§
Source§impl GraphStore
impl GraphStore
Sourcepub fn get_nodes_in_file(&self, file_path: &PathBuf) -> Vec<Node>
pub fn get_nodes_in_file(&self, file_path: &PathBuf) -> Vec<Node>
Get all nodes in a file
Sourcepub fn get_nodes_by_name(&self, name: &str) -> Vec<Node>
pub fn get_nodes_by_name(&self, name: &str) -> Vec<Node>
Get nodes by symbol name
Sourcepub fn get_nodes_by_kind(&self, kind: NodeKind) -> Vec<Node>
pub fn get_nodes_by_kind(&self, kind: NodeKind) -> Vec<Node>
Get nodes by kind
Sourcepub fn get_outgoing_edges(&self, node_id: &NodeId) -> Vec<Edge>
pub fn get_outgoing_edges(&self, node_id: &NodeId) -> Vec<Edge>
Get outgoing edges from a node
Sourcepub fn get_incoming_edges(&self, node_id: &NodeId) -> Vec<Edge>
pub fn get_incoming_edges(&self, node_id: &NodeId) -> Vec<Edge>
Get incoming edges to a node
Sourcepub fn get_stats(&self) -> GraphStats
pub fn get_stats(&self) -> GraphStats
Get graph statistics
Sourcepub fn remove_node(&self, node_id: &NodeId) -> Option<Node>
pub fn remove_node(&self, node_id: &NodeId) -> Option<Node>
Remove a node and all its edges
Sourcepub fn get_all_files(&self) -> Vec<PathBuf>
pub fn get_all_files(&self) -> Vec<PathBuf>
Get all file paths in the index
Sourcepub fn iter_file_index(
&self,
) -> impl Iterator<Item = (PathBuf, Vec<NodeId>)> + '_
pub fn iter_file_index( &self, ) -> impl Iterator<Item = (PathBuf, Vec<NodeId>)> + '_
Iterate over file index entries (file path -> node IDs)
Sourcepub fn iter_symbol_index(
&self,
) -> impl Iterator<Item = (String, Vec<NodeId>)> + '_
pub fn iter_symbol_index( &self, ) -> impl Iterator<Item = (String, Vec<NodeId>)> + '_
Iterate over symbol index entries (symbol name -> node IDs)
Sourcepub fn get_nodes_by_file(&self, file_path: &PathBuf) -> Vec<NodeId>
pub fn get_nodes_by_file(&self, file_path: &PathBuf) -> Vec<NodeId>
Get nodes by file path
Sourcepub fn get_node_ids_by_name(&self, name: &str) -> Vec<NodeId>
pub fn get_node_ids_by_name(&self, name: &str) -> Vec<NodeId>
Get nodes by symbol name
Trait Implementations§
Source§impl Debug for GraphStore
impl Debug for GraphStore
Auto Trait Implementations§
impl Freeze for GraphStore
impl !RefUnwindSafe for GraphStore
impl Send for GraphStore
impl Sync for GraphStore
impl Unpin for GraphStore
impl !UnwindSafe for GraphStore
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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