#[repr(u8)]pub enum RootNodeKind {
Show 27 variants
Mod = 0,
Stmt = 1,
Expr = 2,
ExceptHandler = 3,
InterpolatedStringElement = 4,
Pattern = 5,
TypeParam = 6,
InterpolatedStringFormatSpec = 7,
PatternArguments = 8,
PatternKeyword = 9,
Comprehension = 10,
Arguments = 11,
Parameters = 12,
Parameter = 13,
ParameterWithDefault = 14,
Keyword = 15,
Alias = 16,
WithItem = 17,
MatchCase = 18,
Decorator = 19,
ElifElseClause = 20,
TypeParams = 21,
FString = 22,
TString = 23,
StringLiteral = 24,
BytesLiteral = 25,
Identifier = 26,
}Expand description
The unflattened enum or struct type stored by an AnyRootNodeRef.
Unlike NodeKind, this does not distinguish variants of root enums such as Stmt
and Expr.
Variants§
Mod = 0
Stmt = 1
Expr = 2
ExceptHandler = 3
InterpolatedStringElement = 4
Pattern = 5
TypeParam = 6
InterpolatedStringFormatSpec = 7
PatternArguments = 8
PatternKeyword = 9
Comprehension = 10
Arguments = 11
Parameters = 12
Parameter = 13
ParameterWithDefault = 14
Keyword = 15
Alias = 16
WithItem = 17
MatchCase = 18
Decorator = 19
ElifElseClause = 20
TypeParams = 21
FString = 22
TString = 23
StringLiteral = 24
BytesLiteral = 25
Identifier = 26
Implementations§
Source§impl RootNodeKind
impl RootNodeKind
Sourcepub const ALL: &'static [RootNodeKind]
pub const ALL: &'static [RootNodeKind]
All root node kinds in discriminant order.
Sourcepub fn from_u8(value: u8) -> Option<RootNodeKind>
pub fn from_u8(value: u8) -> Option<RootNodeKind>
Returns the root node kind with the given discriminant.
Trait Implementations§
Source§impl Clone for RootNodeKind
impl Clone for RootNodeKind
Source§fn clone(&self) -> RootNodeKind
fn clone(&self) -> RootNodeKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RootNodeKind
Source§impl Debug for RootNodeKind
impl Debug for RootNodeKind
impl Eq for RootNodeKind
Source§impl GetSize for RootNodeKind
impl GetSize for RootNodeKind
Source§fn get_heap_size(&self) -> usize
fn get_heap_size(&self) -> usize
Determines how many bytes this object occupies inside the heap. Read more
Source§fn get_heap_size_with_tracker<TRACKER>(
&self,
tracker: TRACKER,
) -> (usize, TRACKER)where
TRACKER: GetSizeTracker,
fn get_heap_size_with_tracker<TRACKER>(
&self,
tracker: TRACKER,
) -> (usize, TRACKER)where
TRACKER: GetSizeTracker,
Determines how many bytes this object occupies inside the heap while using a
tracker. Read moreSource§fn get_stack_size() -> usize
fn get_stack_size() -> usize
Determines how may bytes this object occupies inside the stack. Read more
Source§fn get_size_with_tracker<T>(&self, tracker: T) -> (usize, T)where
T: GetSizeTracker,
fn get_size_with_tracker<T>(&self, tracker: T) -> (usize, T)where
T: GetSizeTracker,
Determines the total size of the object while using a
tracker. Read moreSource§impl PartialEq for RootNodeKind
impl PartialEq for RootNodeKind
impl StructuralPartialEq for RootNodeKind
Auto Trait Implementations§
impl Freeze for RootNodeKind
impl RefUnwindSafe for RootNodeKind
impl Send for RootNodeKind
impl Sync for RootNodeKind
impl Unpin for RootNodeKind
impl UnsafeUnpin for RootNodeKind
impl UnwindSafe for RootNodeKind
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§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.impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> Helper for T
Source§impl<T, U> ImaginaryInto<U> for Twhere
U: ImaginaryFrom<T>,
impl<T, U> ImaginaryInto<U> for Twhere
U: ImaginaryFrom<T>,
fn imaginary_into(self) -> U
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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