#[non_exhaustive]#[repr(u32)]pub enum PgNodeKind {
Show 20 variants
VariableDecl = 1,
VariableUse = 2,
Assignment = 3,
Binary = 4,
Comparison = 5,
FunctionCall = 6,
FunctionDef = 7,
IfStmt = 8,
ForStmt = 9,
WhileStmt = 10,
ReturnStmt = 11,
Deref = 12,
AddrOf = 13,
Cast = 14,
MemberAccess = 15,
ArrayAccess = 16,
StructDecl = 17,
LiteralInt = 18,
LiteralStr = 19,
LiteralFloat = 20,
}Expand description
Canonical node kinds for the Performance Graph (PG) layout. Shared between surgec and vyre as the definitive source of truth.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
VariableDecl = 1
Variable declaration node.
VariableUse = 2
Variable usage node.
Assignment = 3
Assignment statement node.
Binary = 4
Binary operation node.
Comparison = 5
Comparison operation node.
FunctionCall = 6
Function call node.
FunctionDef = 7
Function definition node.
IfStmt = 8
If statement node.
ForStmt = 9
For loop node.
WhileStmt = 10
While loop node.
ReturnStmt = 11
Return statement node.
Deref = 12
Pointer dereference node.
AddrOf = 13
Address-of node.
Cast = 14
Type cast node.
MemberAccess = 15
Member access node.
ArrayAccess = 16
Array access node.
StructDecl = 17
Struct declaration node.
LiteralInt = 18
Integer literal node.
LiteralStr = 19
String literal node.
LiteralFloat = 20
Floating point literal node.
Implementations§
Trait Implementations§
Source§impl Clone for PgNodeKind
impl Clone for PgNodeKind
Source§fn clone(&self) -> PgNodeKind
fn clone(&self) -> PgNodeKind
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PgNodeKind
impl Debug for PgNodeKind
Source§impl<'de> Deserialize<'de> for PgNodeKind
impl<'de> Deserialize<'de> for PgNodeKind
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for PgNodeKind
impl Hash for PgNodeKind
Source§impl PartialEq for PgNodeKind
impl PartialEq for PgNodeKind
Source§impl Serialize for PgNodeKind
impl Serialize for PgNodeKind
impl Copy for PgNodeKind
impl Eq for PgNodeKind
impl StructuralPartialEq for PgNodeKind
Auto Trait Implementations§
impl Freeze for PgNodeKind
impl RefUnwindSafe for PgNodeKind
impl Send for PgNodeKind
impl Sync for PgNodeKind
impl Unpin for PgNodeKind
impl UnsafeUnpin for PgNodeKind
impl UnwindSafe for PgNodeKind
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
Mutably borrows from an owned value. Read more