Skip to main content

Module call_graph

Module call_graph 

Source

Structs§

BfsNode
BuildProgress
CallEdge
CallGraph
CallGraphInputs
Everything the call-graph builder reads, sourced from the GraphProvider facade (PropertyGraph). Replaces the former direct ProjectIndex dependency (#696): the file inventory, the symbol table (for enclosing-symbol attribution) and the import/reexport adjacency (for scope-aware callee resolution). Source content itself is still read fresh from disk per file.
PathHop
SymbolSpan
Minimal symbol span the call-graph builder needs to attribute a call site to its enclosing symbol — backend-agnostic, decoupled from any graph store.

Enums§

RiskLevel
ScopeMatch
Which scope step resolved a callee structurally — the strength of the evidence. Same-file and imported definitions are bound by the caller’s own scope; a name that is merely unique project-wide may still be an external function of the same name.
StructuralTarget
Structural view of one call edge’s callee.

Functions§

build_import_adjacency
Build a file -> imported files adjacency from the project index’s import and reexport edges, used to scope callee resolution to a caller’s imports.
callee_matches
Whether a call to callee_name is a call to the symbol named by query.
callee_segment
The identifier a callee name ends in: crate::db::save → save, pkg.Func → Func, save → save.
current_file_hashes
Current content hashes of the indexed files — the same values a CallGraph records in file_hashes — without building or loading a call graph. For callers that need only the hashes (semantic cache keys and project revision), which is a fraction of a call-graph build.
resolve_callee_file
Resolve a single callee name to its defining file in the scope of caller_file.
resolve_callee_files
Resolve callee names to a single defining file when scope makes it unambiguous across all call sites. Names that resolve to different files from different scopes are omitted, so callers never attribute a call to the wrong file. Keyed by callee name to match the call graph’s name-keyed nodes.
resolve_edge_callee_files
Resolve each edge’s callee to its defining file in that edge’s own caller scope (index-aligned with edges). None = ambiguous or unknown; never guesses. Use this for per-edge consumers (graph edges); the name-keyed resolve_callee_files additionally drops names that differ across scopes.
resolve_edge_callee_targets
Like resolve_edge_callee_files, but keeps why each edge resolved — or that it is ambiguous vs. unknown — for evidence grading and semantic escalation.

Type Aliases§

FileStamp
(size in bytes, mtime in ns since the Unix epoch) of a file.