Skip to main content

Edge

Enum Edge 

Source
pub enum Edge {
Show 13 variants 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>, source: Option<SemanticProvenance>, overload_signature: 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>, }, BusHop { from_file: String, from_line: usize, message: String, to: String, to_file: String, evidence: String, },
}
Expand description

Fills the slot this variant previously reserved: source: Option<SemanticProvenance>, appended after member and omitted when empty, on the same rule.

Variants§

§

Inherits

Represents Inherits.

Fields

§from_file: String

The value value.

§from_line: usize

The value value.

§to: String

The value value.

§to_file: String

The value value.

§heuristic: bool

The value value.

§

UsesType

Represents UsesType.

Fields

§from_file: String

The value value.

§from_line: usize

The value value.

§to: String

The value value.

§to_file: String

The value value.

§heuristic: bool

The value value.

§

UsesMember

Represents UsesMember.

Fields

§from_file: String

The value value.

§from_line: usize

The value value.

§to: String

The value value.

§to_file: String

The value value.

§heuristic: bool

The value value.

§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.

§member: Option<String>

The member this reference reads or calls, on precise and heuristic edges alike. None only for a reference the extractor recorded no member name for.

§source: Option<SemanticProvenance>

Some exactly on an edge a same-context compiler fact produced (Edge::uses_member_semantic); None, and hence entirely absent from the serialized bytes, on every edge the ladder or a heuristic tier produced – a graph built without the semantic layer is byte-identical to one built before this field existed.

§overload_signature: Option<String>

The admitted occurrence’s own overload signature (the producer’s target.overloadSignature, e.g. "(bool)->void"), appended LAST – present only alongside source, and only when the admitted occurrence named one. Two same-line overloads of one member on the SAME type resolve to the SAME to/to_file (the type-level identity a uses-member edge already carries), so without this field their projected edges would be byte-identical and a reader could never tell them apart as the two distinct facts they are. None on every syntax or heuristic edge, which keeps a graph built without the semantic layer byte-identical to one built before this field existed.

§

Imports

The value value.

Fields

§from_file: String

The source file.

§from_line: usize

The source line.

§target: String

The imported target.

§

Ambiguous

Represents Ambiguous.

Fields

§origin: String

The value value.

§from_file: String

The value value.

§from_line: usize

The value value.

§raw: String

The value value.

§candidates: Vec<Candidate>

The value value.

§candidate_count: usize

The value value.

§

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

§from_file: String

The value value.

§from_line: usize

The value value.

§iface: String

The value value.

§resolution: String

The value value.

§args: Option<Vec<String>>

The value value.

§to: Option<String>

The value value.

§candidates: Vec<Candidate>

The value value.

§

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

§from_file: String

The value value.

§from_line: usize

The value value.

§target: String

The value value.

§to_file: String

The value value.

§via: Option<String>

The value value.

§

Call

A call or new naming an imported or locally-exported declaration. The value value.

Fields

§from_file: String

The source file.

§from_line: usize

The source line.

§to: String

The target definition identifier.

§to_file: String

The target file.

§

JsxUse

A JSX tag naming a component declaration. The value value.

Fields

§from_file: String

The source file.

§from_line: usize

The source line.

§to: String

The target definition identifier.

§to_file: String

The target file.

§

Dispatch

An action creator or thunk handed to a dispatching call (dispatch(...), ofType(...)). The value value.

Fields

§from_file: String

The source file.

§from_line: usize

The source line.

§to: String

The target definition identifier.

§to_file: String

The target file.

§

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

§from_file: String

The value value.

§from_line: usize

The value value.

§to: String

The value value.

§to_file: String

The value value.

§member: Option<String>

The interface member this implementation satisfies; absent for the type-level, registration-driven fact.

§

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.

Fields

§from_file: String

The value value.

§from_line: usize

The value value.

§to: String

The value value.

§to_file: String

The value value.

§member: Option<String>

The value value.

§

BusHop

A message-bus hop: a publish site whose resolved message reaches a registered consumer/handler def, both ends resolved through the ordinary ladder in their own file’s context, never a bare-name or same-line match. to/to_file name the consumer; message names the resolved message def’s own id, followed by an array suffix ([] per array layer) when the identity both sides agreed on is an array of that def rather than the def alone – never the raw text either site wrote it as, so two same-named messages in different namespaces, or a message and an array of it, can never be conflated. evidence names which consumer shape the hop was established through – see resolve/bus.rs’s own closed word list, the one place any of its words is spelled.

Fields

§from_file: String

The value value.

§from_line: usize

The value value.

§message: String

The value value.

§to: String

The value value.

§to_file: String

The value value.

§evidence: String

The value value.

Implementations§

Source§

impl Edge

Source

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.

Source

pub fn is_heuristic(&self) -> bool

Whether the edge declares itself a guess, across the three kinds that can carry the flag.

Source

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.

Source

pub fn uses_member_semantic( from_file: String, from_line: usize, to: String, to_file: String, member: Option<String>, provenance: SemanticProvenance, overload_signature: Option<String>, ) -> Edge

The one way to build a compiler-vouched uses-member edge: never heuristic, never tiered (a confirmed compiler fact is not a guess), always carrying source so a reader can tell it apart from every edge the ladder or a heuristic tier produced. overload_signature carries the admitted occurrence’s own signature, when it named one – the exact identity that keeps two same-line overloads of one member distinguishable once projected.

Source

pub fn provenance(&self) -> Option<SemanticProvenance>

Which population produced this edge, when it names one at all – None for every kind that is not a compiler-vouched uses-member edge, including an ordinary precise or heuristic one.

Trait Implementations§

Source§

impl Clone for Edge

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Edge

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Edge

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Edge

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Edge

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.