pub enum Edge {
Inherits {
from_file: String,
from_line: usize,
to: String,
to_file: String,
heuristic: bool,
},
UsesType {
from_file: String,
from_line: usize,
to: String,
to_file: String,
heuristic: bool,
},
UsesMember {
from_file: String,
from_line: usize,
to: String,
to_file: String,
heuristic: bool,
tier: Option<HeuristicTier>,
member: Option<String>,
},
Imports {
from_file: String,
from_line: usize,
target: String,
},
Ambiguous {
origin: String,
from_file: String,
from_line: usize,
raw: String,
candidates: Vec<Candidate>,
candidate_count: usize,
},
CtorDi {
from_file: String,
from_line: usize,
iface: String,
resolution: String,
args: Option<Vec<String>>,
to: Option<String>,
candidates: Vec<Candidate>,
},
Import {
from_file: String,
from_line: usize,
target: String,
to_file: String,
via: Option<String>,
},
Call {
from_file: String,
from_line: usize,
to: String,
to_file: String,
},
JsxUse {
from_file: String,
from_line: usize,
to: String,
to_file: String,
},
Dispatch {
from_file: String,
from_line: usize,
to: String,
to_file: String,
},
Implements {
from_file: String,
from_line: usize,
to: String,
to_file: String,
member: Option<String>,
},
Overrides {
from_file: String,
from_line: usize,
to: String,
to_file: String,
member: Option<String>,
},
}Expand description
The guess tag, appended LAST on every edge kind that can
carry it. heuristic: true is set only on an edge a heuristic tier
emitted and never writes heuristic: false, so this side pairs
skip_serializing_if with default: absent == precise, and a precise
edge’s bytes are exactly what they were before the tag existed. Only
the resolver’s heuristic tiers set it today (both
uses-member), but the flag lives on all three targeted kinds because
the query layer’s heuristic adjacency is kind-keyed, so a future tier
tagging a uses-type edge needs no schema change.
uses-member carries two more appended keys, tier then member, in
that order and NOT mirrored onto the other two kinds: neither has a
member to name, and no tier tags one today. tier splits the umbrella
flag into the two tiers a reader can act on differently; member names
the member the reference reads or calls and is written on every
uses-member edge, precise ones included, because “which member” is a fact
about the reference rather than about the guess. Both are
omit-when-None, so a reader of the old shape sees only added keys.
The next slot on this variant is reserved for source: Option<Provenance>
("semantic" for an edge a real compiler vouched for), appended after
member and omitted when empty, on the same rule.
Variants§
Inherits
Represents Inherits.
Fields
UsesType
Represents UsesType.
Fields
UsesMember
Represents UsesMember.
Fields
tier: Option<HeuristicTier>Which guess tier emitted this edge – Some exactly when
heuristic is true. Build the variant through
Edge::uses_member, which derives one from the other.
Imports
The value value.
Fields
Ambiguous
Represents Ambiguous.
Fields
CtorDi
Constructor-parameter DI resolution (see resolve.rs’s
resolve_ctor_param). Field order (kind, from_file, from_line,
iface, resolution, args, to, candidates) is significant –
it fixes the serialized field order.
iface is the injected type’s bare identifier; args its closed
generic arguments, present only when it has any; to the resolved
implementation’s def id, present only for ‘plain’/‘closed’/
‘open-generic’; candidates the capped, sorted tie list, present only
for ‘ambiguous’.
Fields
Import
A TS/TSX module import. Distinct from imports (C#’s
using directive, which names a NAMESPACE and resolves to no file):
target is the specifier as written and to_file the file it
resolved to. via is appended LAST and present only on a
barrel-followed edge, naming the module the source literally imported
so a reader can tell the routing table apart from the dependency.
Fields
Call
A call or new naming an imported or locally-exported
declaration.
The value value.
Fields
JsxUse
A JSX tag naming a component declaration. The value value.
Fields
Dispatch
An action creator or thunk handed to a dispatching call
(dispatch(...), ofType(...)).
The value value.
Fields
Implements
The implementation of a service interface: either a type-level fact
(member absent) read off a two-type-argument DI registration call
(services.AddScoped<IContract, Impl>()), recorded against the
IMPLEMENTATION type’s own declaring file and line – the same
convention inherits uses for its own base-list reference, applied
here to a fact the resolver derived rather than one it read directly
off that type’s own base list – or a member-level fact (member
present, naming the satisfied interface member) connecting an
implementing member to the interface member it satisfies. Never a
guess: an ambiguous name-and-arity match emits nothing rather than
picking a candidate. to/to_file name the interface.
Fields
Overrides
An override member connected to the nearest in-graph base member of
the same name and arity, matched the same way implements is: two or
more candidates at that arity emit nothing. to/to_file name the
base type declaring the overridden member; member names it.
Implementations§
Source§impl Edge
impl Edge
Sourcepub fn tier(&self) -> Option<HeuristicTier>
pub fn tier(&self) -> Option<HeuristicTier>
The guess tier that emitted this edge, or None on a precise one –
and on every kind that carries no tier at all, which is every kind but
uses-member.
Sourcepub fn is_heuristic(&self) -> bool
pub fn is_heuristic(&self) -> bool
Whether the edge declares itself a guess, across the three kinds that can carry the flag.
Sourcepub fn uses_member(
from_file: String,
from_line: usize,
to: String,
to_file: String,
member: Option<String>,
tier: Option<HeuristicTier>,
) -> Edge
pub fn uses_member( from_file: String, from_line: usize, to: String, to_file: String, member: Option<String>, tier: Option<HeuristicTier>, ) -> Edge
The one way to build a uses-member edge. heuristic is DERIVED from
tier rather than passed alongside it, so the two cannot disagree: a
tagged edge is always flagged, a flagged edge always names its tier,
and no emit site can grow a third state by forgetting a field.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Edge
impl<'de> Deserialize<'de> for Edge
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl StructuralPartialEq for Edge
Auto Trait Implementations§
impl Freeze for Edge
impl RefUnwindSafe for Edge
impl Send for Edge
impl Sync for Edge
impl Unpin for Edge
impl UnsafeUnpin for Edge
impl UnwindSafe for Edge
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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