pub enum EdgeKind {
Depends,
RefCall,
DefinesBinding,
Exports,
ResolvesTo,
RefImports,
IsImplementation,
Overrides,
FFICall,
}Expand description
The kinds of edges supported in the Travsr multiplex graph.
Variants§
Depends
File / module import. Corresponds to Kythe %kythe/edge/depends.
RefCall
Call-site reference. Corresponds to Kythe %kythe/edge/ref/call.
DefinesBinding
Definition-binding edge (parent → child in the AST).
Exports
A symbol exported from a module.
ResolvesTo
An import node resolved to the file node it targets.
Connects import:./foo → file:foo.ts, enabling transitive
caller traversal across file boundaries.
RefImports
Named import specifier reference emitted by the LSIF pipeline.
Distinguishes semantic import references from file-level Depends edges.
IsImplementation
Class-to-interface implementation edge emitted by the LSIF pipeline.
Overrides
Method override edge emitted by the LSIF pipeline when a subclass method shadows a same-named method in the base class.
FFICall
Cross-language FFI call edge (RFC-005). Confidence lives on Edge.confidence
so EdgeKind stays Copy. PPR weight: 0.85 (ADR-003 amendment, 2026-05-24).
Implementations§
Source§impl EdgeKind
impl EdgeKind
Sourcepub fn ppr_weight(self) -> f32
pub fn ppr_weight(self) -> f32
PPR transition weight for this edge kind.
Weights encode the semantic importance of each edge type for Personalized PageRank: a higher weight means PPR mass flows more readily across edges of this kind, producing higher scores for reachable nodes.
§Rationale (DEBT-016 / ADR-003)
| Kind | Weight | Reasoning |
|---|---|---|
RefCall | 1.00 | Direct call — strongest semantic link |
DefinesBinding | 0.70 | Parent→child definition — strong structural link |
Exports | 0.60 | Exported API surface — important for callers |
Depends | 0.50 | File import — broad but less targeted |
ResolvesTo | 0.50 | Import→file resolution — same as Depends |
RefImports | 0.40 | Named import specifier — narrower than file import |
IsImplementation | 0.40 | Class implements interface — type-system link |
Overrides | 0.30 | Method override — weakest semantic tie |
Weights are normalised per-node at PPR iteration time so their absolute scale does not matter — only the ratios between kinds.