Enum EdgeType

Source
pub enum EdgeType {
Show 25 variants UnknownEdgeType = 0, Ast = 3, Call = 6, Ref = 10, TaggedBy = 11, ParameterLink = 12, Cfg = 19, EvalType = 21, BindsTo = 22, InheritsFrom = 23, Contains = 28, Capture = 40, CapturedBy = 41, Receiver = 55, Condition = 56, ReachingDef = 137, AliasOf = 138, Binds = 155, Argument = 156, SourceFile = 157, Dominate = 181, PostDominate = 182, Cdg = 183, Imports = 23_663, IsCallForImport = 23_664,
}

Variants§

§

UnknownEdgeType = 0

§

Ast = 3

This edge connects a parent node to its child in the syntax tree.

§

Call = 6

This edge connects call sites, i.e., nodes with the type CALL, to the method node that represent the method they invoke. The frontend MAY create CALL edges but is not required to do so. Instead, of the METHOD_FULL_NAME field of the CALL node is set correctly, CALL edges are created automatically as the CPG is first loaded.

§

Ref = 10

This edge indicates that the source node is an identifier that denotes access to the destination node. For example, an identifier may reference a local variable.

§

TaggedBy = 11

Edges from nodes to the tags they are tagged by.

This edge connects a method input parameter to the corresponding method output parameter.

§

Cfg = 19

This edge indicates control flow from the source to the destination node.

§

EvalType = 21

This edge connects a node to its evaluation type.

§

BindsTo = 22

This edge connects type arguments to type parameters to indicate that the type argument is used to instantiate the type parameter.

§

InheritsFrom = 23

Inheritance relation between a type declaration and a type. This edge MUST NOT be created by the language frontend as it is automatically created from INHERITS_FROM_TYPE_FULL_NAME fields then the CPG is first loaded.

§

Contains = 28

This edge connects a node to the method that contains it.

§

Capture = 40

Represents the capturing of a variable into a closure

§

CapturedBy = 41

Connection between a captured LOCAL and the corresponding CLOSURE_BINDING

§

Receiver = 55

Similar to ARGUMENT edges, RECEIVER edges connect call sites to their receiver arguments. A receiver argument is the object on which a method operates, that is, it is the expression that is assigned to the this pointer as control is transferred to the method.

§

Condition = 56

The edge connects control structure nodes to the expressions that holds their conditions.

§

ReachingDef = 137

A reaching definition edge indicates that a variable produced at the source node reaches the destination node without being reassigned on the way. The VARIABLE property indicates which variable is propagated.

§

AliasOf = 138

This edge represents an alias relation between a type declaration and a type. The language frontend MUST NOT create ALIAS_OF edges as they are created automatically based on ALIAS_TYPE_FULL_NAME fields when the CPG is first loaded.

§

Binds = 155

This edge connects a type declaration (TYPE_DECL) with a binding node (BINDING) and indicates that the type declaration has the binding represented by the binding node, in other words, there is a (name, signature) pair that can be resolved for the type declaration as stored in the binding node.

§

Argument = 156

Argument edges connect call sites (node type CALL) to their arguments (node type EXPRESSION) as well as RETURN nodes to the expressions that return.

§

SourceFile = 157

This edge connects a node to the node that represents its source file. These edges MUST not be created by the language frontend but are automatically created based on FILENAME fields.

§

Dominate = 181

This edge indicates that the source node immediately dominates the destination node.

§

PostDominate = 182

This edge indicates that the source node immediately post dominates the destination node.

§

Cdg = 183

A CDG edge expresses that the destination node is control dependent on the source node.

§

Imports = 23_663

Edge from imports to dependencies

§

IsCallForImport = 23_664

Edge from CALL statement in the AST to the IMPORT.  |We use this edge to traverse from the logical representation of the IMPORT  |to the corresponding import statement in the AST.  |

Trait Implementations§

Source§

impl Clone for EdgeType

Source§

fn clone(&self) -> EdgeType

Returns a copy of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for EdgeType

Source§

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

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

impl<'de> Deserialize<'de> for EdgeType

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 Hash for EdgeType

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for EdgeType

Source§

fn cmp(&self, other: &EdgeType) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for EdgeType

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for EdgeType

Source§

fn partial_cmp(&self, other: &EdgeType) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Serialize for EdgeType

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 Copy for EdgeType

Source§

impl Eq for EdgeType

Source§

impl StructuralPartialEq for EdgeType

Auto Trait Implementations§

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> 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> 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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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

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