pub struct GraphModule { /* private fields */ }Expand description
Graph module for symbol and reference queries.
§Examples
See crate-level documentation for usage examples.
Implementations§
Source§impl GraphModule
impl GraphModule
Sourcepub async fn find_symbol_by_id(&self, id: SymbolId) -> Result<Symbol>
pub async fn find_symbol_by_id(&self, id: SymbolId) -> Result<Symbol>
Sourcepub async fn cycles(&self) -> Result<Vec<Cycle>>
pub async fn cycles(&self) -> Result<Vec<Cycle>>
Detects cycles in the call graph.
Uses DFS-based cycle detection to find all strongly connected components (cycles) in the call graph.
§Returns
A vector of detected cycles
Sourcepub async fn symbol_count(&self) -> Result<usize>
pub async fn symbol_count(&self) -> Result<usize>
Returns the number of symbols in the graph.
Sourcepub async fn index(&self) -> Result<()>
pub async fn index(&self) -> Result<()>
Indexes the codebase using magellan.
This runs the magellan indexer to extract symbols and references from the codebase and populate the graph database.
For Native V3 backend, also indexes cross-file references using sqlitegraph directly (a capability SQLite doesn’t support).
§Returns
Ok(()) on success, or an error if indexing fails.
Trait Implementations§
Source§impl Clone for GraphModule
impl Clone for GraphModule
Source§fn clone(&self) -> GraphModule
fn clone(&self) -> GraphModule
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 moreAuto Trait Implementations§
impl Freeze for GraphModule
impl RefUnwindSafe for GraphModule
impl Send for GraphModule
impl Sync for GraphModule
impl Unpin for GraphModule
impl UnsafeUnpin for GraphModule
impl UnwindSafe for GraphModule
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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