Skip to main content

Edge

Enum Edge 

Source
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

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

§

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.

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.

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.