pub enum NodeKind {
Show 59 variants
Block,
LetBinding,
Semi,
Paren,
Literal(LiteralKind),
Placeholder(PlaceholderKind, usize),
BinaryOp(BinOpKind),
UnaryOp(UnOpKind),
Range,
Call,
MethodCall,
FieldAccess,
Index,
Path,
Closure,
FnSignature,
Return,
Break,
Continue,
Assign,
Reference {
mutable: bool,
},
Tuple,
Array,
Repeat,
Cast,
StructInit,
Await,
Try,
If,
Match,
MatchArm,
Loop,
While,
ForLoop,
LetExpr,
PatWild,
PatPlaceholder(PlaceholderKind, usize),
PatTuple,
PatStruct,
PatOr,
PatLiteral,
PatReference {
mutable: bool,
},
PatSlice,
PatRest,
PatRange,
TypePlaceholder(PlaceholderKind, usize),
TypeReference {
mutable: bool,
},
TypeTuple,
TypeSlice,
TypeArray,
TypePath,
TypeImplTrait,
TypeInfer,
TypeUnit,
TypeNever,
FieldValue,
MacroCall {
name: String,
},
Opaque,
None,
}Expand description
The kind of a normalized AST node. Carries only non-child data (operator kinds, literal kinds, placeholder indices, mutability flags, macro names).
Variants§
Block
LetBinding
Semi
Paren
Literal(LiteralKind)
Placeholder(PlaceholderKind, usize)
BinaryOp(BinOpKind)
UnaryOp(UnOpKind)
Range
Call
MethodCall
FieldAccess
Index
Path
Closure
FnSignature
Return
Break
Continue
Assign
Reference
Tuple
Array
Repeat
Cast
StructInit
Await
Try
If
Match
MatchArm
Loop
While
ForLoop
LetExpr
PatWild
PatPlaceholder(PlaceholderKind, usize)
PatTuple
PatStruct
PatOr
PatLiteral
PatReference
PatSlice
PatRest
PatRange
TypePlaceholder(PlaceholderKind, usize)
TypeReference
TypeTuple
TypeSlice
TypeArray
TypePath
TypeImplTrait
TypeInfer
TypeUnit
TypeNever
FieldValue
MacroCall
Opaque
None
Sentinel for absent optional children, ensuring fixed child positions for correct zip alignment in similarity comparison.
Trait Implementations§
impl Eq for NodeKind
impl StructuralPartialEq for NodeKind
Auto Trait Implementations§
impl Freeze for NodeKind
impl RefUnwindSafe for NodeKind
impl Send for NodeKind
impl Sync for NodeKind
impl Unpin for NodeKind
impl UnsafeUnpin for NodeKind
impl UnwindSafe for NodeKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.