pub enum GraphProvider {
PropertyGraph(CodeGraph),
GraphIndex(ProjectIndex),
}Variants§
PropertyGraph(CodeGraph)
GraphIndex(ProjectIndex)
Implementations§
Source§impl GraphProvider
impl GraphProvider
pub fn node_count(&self) -> Option<usize>
pub fn edge_count(&self) -> Option<usize>
pub fn dependencies(&self, file_path: &str) -> Vec<String>
pub fn dependents(&self, file_path: &str) -> Vec<String>
pub fn file_paths(&self) -> Vec<String>
pub fn file_count(&self) -> usize
pub fn symbol_count(&self) -> usize
pub fn find_symbols( &self, name: &str, file_filter: Option<&str>, kind_filter: Option<&str>, ) -> Vec<SymbolInfo>
Sourcepub fn all_symbols(&self) -> Vec<SymbolInfo>
pub fn all_symbols(&self) -> Vec<SymbolInfo>
Every symbol with its file + line span (unfiltered). Backend-agnostic
equivalent of iterating ProjectIndex::symbols — used by the call-graph
builder to attribute call sites to their enclosing symbol.
pub fn get_symbol(&self, key: &str) -> Option<SymbolInfo>
Sourcepub fn find_symbol_by_handle(&self, handle: &SymbolHandle) -> Option<SymbolInfo>
pub fn find_symbol_by_handle(&self, handle: &SymbolHandle) -> Option<SymbolInfo>
Resolve a stable SymbolHandle to
its current SymbolInfo, robust to line drift. Resolution order:
- Exact
(path, name)— the unique{file}::{name}index key, so the common case is a singleO(1)lookup that ignores the@Llinehint entirely (the symbol may have moved since the handle was emitted). - Otherwise, same-file candidates whose name matches exactly or by its
unqualified tail (
Config::load↔load), ranked by exact-name first, then nearest line to the handle hint, then lowest line, then name — a total, deterministic order (#498).
Returns None only when no symbol in that file plausibly matches. The
@Lline is never a hard requirement, so this is strictly more robust
than a brittle line-only reference.
pub fn edges(&self) -> Vec<EdgeInfo>
pub fn edges_by_kind(&self, kind: &str) -> Vec<EdgeInfo>
Sourcepub fn file_entries(&self) -> Vec<FileInfo>
pub fn file_entries(&self) -> Vec<FileInfo>
Every catalogued file as FileInfo. Backend-agnostic equivalent of
iterating ProjectIndex::files — used by stats/bootstrap consumers that
need per-file language + token counts, not just paths.
pub fn get_file_entry(&self, path: &str) -> Option<FileInfo>
pub fn last_scan(&self) -> String
Sourcepub fn materialize_project_index(&self, project_root: &str) -> ProjectIndex
pub fn materialize_project_index(&self, project_root: &str) -> ProjectIndex
Reconstruct a full ProjectIndex from this provider — the inverse of
the graph_index→PG mirror
(populate_from_project_index).
Lets the
remaining legacy ProjectIndex consumers be sourced from the
PropertyGraph (parity-proven lossless, #682.3) so the redundant JSON
store can be retired (#696 phase C). For the GraphIndex backend it clones
the index it already holds.
pub fn index_dir(project_root: &str) -> Option<PathBuf>
Scored related files using multi-edge weights. Falls back to unscored deps/dependents for GraphIndex backend.
Auto Trait Implementations§
impl !Freeze for GraphProvider
impl !RefUnwindSafe for GraphProvider
impl !Sync for GraphProvider
impl !UnwindSafe for GraphProvider
impl Send for GraphProvider
impl Unpin for GraphProvider
impl UnsafeUnpin for GraphProvider
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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> ⓘ
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> ⓘ
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