pub enum GraphProvider {
PropertyGraph(CodeGraph),
GraphIndex(ProjectIndex),
}Variants§
PropertyGraph(CodeGraph)
GraphIndex(ProjectIndex)
Implementations§
Source§impl GraphProvider
The tool-facing surface. Every file, symbol and edge it returns has passed
the serve-time source check (property_graph::served, G04): the property
graph carries its gate for the request that opened it, the index backend
gets one per call. The *_unchecked accessors below are the raw store
reads and stay private to this facade.
impl GraphProvider
The tool-facing surface. Every file, symbol and edge it returns has passed
the serve-time source check (property_graph::served, G04): the property
graph carries its gate for the request that opened it, the index backend
gets one per call. The *_unchecked accessors below are the raw store
reads and stay private to this facade.
pub fn dependencies(&self, file_path: &str) -> Vec<String>
pub fn dependents(&self, file_path: &str) -> Vec<String>
Files reached from file_path within depth. The walk itself runs
over served files only: nothing is reached through a file that is not
served now (property_graph::queries::impact_analysis,
ProjectIndex::get_related_served).
pub fn file_paths(&self) -> Vec<String>
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 by name).
pub fn get_symbol(&self, key: &str) -> Option<SymbolInfo>
pub fn edges(&self) -> Vec<EdgeInfo>
pub fn get_file_entry(&self, path: &str) -> Option<FileInfo>
Scored related files using multi-edge weights (unscored deps and
dependents for the index backend). Only served neighbours are ranked,
and limit is applied after the check: a file that is not served now
takes no slot from one that is.
pub fn node_count(&self) -> Option<usize>
pub fn edge_count(&self) -> Option<usize>
pub fn file_count(&self) -> usize
pub fn symbol_count(&self) -> usize
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_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 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>
Auto Trait Implementations§
impl !Freeze for GraphProvider
impl !RefUnwindSafe for GraphProvider
impl !Sync for GraphProvider
impl !UnwindSafe for GraphProvider
impl Forget for GraphProvider
impl Move 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