Skip to main content

AnyNode

Enum AnyNode 

Source
pub enum AnyNode<'tree> {
Show 152 variants Literal(Literal<'tree>), SimpleType(SimpleType<'tree>), Type(Type<'tree>), UnannotatedType(UnannotatedType<'tree>), Declaration(Declaration<'tree>), Expression(Expression<'tree>), ModuleDirective(ModuleDirective<'tree>), PrimaryExpression(PrimaryExpression<'tree>), Statement(Statement<'tree>), AnnotatedType(AnnotatedType<'tree>), Annotation(Annotation<'tree>), AnnotationArgumentList(AnnotationArgumentList<'tree>), AnnotationTypeBody(AnnotationTypeBody<'tree>), AnnotationTypeDeclaration(AnnotationTypeDeclaration<'tree>), AnnotationTypeElementDeclaration(AnnotationTypeElementDeclaration<'tree>), ArgumentList(ArgumentList<'tree>), ArrayAccess(ArrayAccess<'tree>), ArrayCreationExpression(ArrayCreationExpression<'tree>), ArrayInitializer(ArrayInitializer<'tree>), ArrayType(ArrayType<'tree>), AssertStatement(AssertStatement<'tree>), AssignmentExpression(AssignmentExpression<'tree>), Asterisk(Asterisk<'tree>), BinaryExpression(BinaryExpression<'tree>), Block(Block<'tree>), BreakStatement(BreakStatement<'tree>), CastExpression(CastExpression<'tree>), CatchClause(CatchClause<'tree>), CatchFormalParameter(CatchFormalParameter<'tree>), CatchType(CatchType<'tree>), ClassBody(ClassBody<'tree>), ClassDeclaration(ClassDeclaration<'tree>), ClassLiteral(ClassLiteral<'tree>), CompactConstructorDeclaration(CompactConstructorDeclaration<'tree>), ConstantDeclaration(ConstantDeclaration<'tree>), ConstructorBody(ConstructorBody<'tree>), ConstructorDeclaration(ConstructorDeclaration<'tree>), ContinueStatement(ContinueStatement<'tree>), Dimensions(Dimensions<'tree>), DimensionsExpr(DimensionsExpr<'tree>), DoStatement(DoStatement<'tree>), ElementValueArrayInitializer(ElementValueArrayInitializer<'tree>), ElementValuePair(ElementValuePair<'tree>), EnhancedForStatement(EnhancedForStatement<'tree>), EnumBody(EnumBody<'tree>), EnumBodyDeclarations(EnumBodyDeclarations<'tree>), EnumConstant(EnumConstant<'tree>), EnumDeclaration(EnumDeclaration<'tree>), ExplicitConstructorInvocation(ExplicitConstructorInvocation<'tree>), ExportsModuleDirective(ExportsModuleDirective<'tree>), ExpressionStatement(ExpressionStatement<'tree>), ExtendsInterfaces(ExtendsInterfaces<'tree>), FieldAccess(FieldAccess<'tree>), FieldDeclaration(FieldDeclaration<'tree>), FinallyClause(FinallyClause<'tree>), FloatingPointType(FloatingPointType<'tree>), ForStatement(ForStatement<'tree>), FormalParameter(FormalParameter<'tree>), FormalParameters(FormalParameters<'tree>), GenericType(GenericType<'tree>), Guard(Guard<'tree>), IfStatement(IfStatement<'tree>), ImportDeclaration(ImportDeclaration<'tree>), InferredParameters(InferredParameters<'tree>), InstanceofExpression(InstanceofExpression<'tree>), IntegralType(IntegralType<'tree>), InterfaceBody(InterfaceBody<'tree>), InterfaceDeclaration(InterfaceDeclaration<'tree>), LabeledStatement(LabeledStatement<'tree>), LambdaExpression(LambdaExpression<'tree>), LocalVariableDeclaration(LocalVariableDeclaration<'tree>), MarkerAnnotation(MarkerAnnotation<'tree>), MethodDeclaration(MethodDeclaration<'tree>), MethodInvocation(MethodInvocation<'tree>), MethodReference(MethodReference<'tree>), Modifiers(Modifiers<'tree>), ModuleBody(ModuleBody<'tree>), ModuleDeclaration(ModuleDeclaration<'tree>), MultilineStringFragment(MultilineStringFragment<'tree>), ObjectCreationExpression(ObjectCreationExpression<'tree>), OpensModuleDirective(OpensModuleDirective<'tree>), PackageDeclaration(PackageDeclaration<'tree>), ParenthesizedExpression(ParenthesizedExpression<'tree>), Pattern(Pattern<'tree>), Permits(Permits<'tree>), Program(Program<'tree>), ProvidesModuleDirective(ProvidesModuleDirective<'tree>), ReceiverParameter(ReceiverParameter<'tree>), RecordDeclaration(RecordDeclaration<'tree>), RecordPattern(RecordPattern<'tree>), RecordPatternBody(RecordPatternBody<'tree>), RecordPatternComponent(RecordPatternComponent<'tree>), RequiresModifier(RequiresModifier<'tree>), RequiresModuleDirective(RequiresModuleDirective<'tree>), Resource(Resource<'tree>), ResourceSpecification(ResourceSpecification<'tree>), ReturnStatement(ReturnStatement<'tree>), ScopedIdentifier(ScopedIdentifier<'tree>), ScopedTypeIdentifier(ScopedTypeIdentifier<'tree>), SpreadParameter(SpreadParameter<'tree>), StaticInitializer(StaticInitializer<'tree>), StringInterpolation(StringInterpolation<'tree>), StringLiteral(StringLiteral<'tree>), SuperInterfaces(SuperInterfaces<'tree>), Superclass(Superclass<'tree>), SwitchBlock(SwitchBlock<'tree>), SwitchBlockStatementGroup(SwitchBlockStatementGroup<'tree>), SwitchExpression(SwitchExpression<'tree>), SwitchLabel(SwitchLabel<'tree>), SwitchRule(SwitchRule<'tree>), SynchronizedStatement(SynchronizedStatement<'tree>), TemplateExpression(TemplateExpression<'tree>), TernaryExpression(TernaryExpression<'tree>), ThrowStatement(ThrowStatement<'tree>), Throws(Throws<'tree>), TryStatement(TryStatement<'tree>), TryWithResourcesStatement(TryWithResourcesStatement<'tree>), TypeArguments(TypeArguments<'tree>), TypeBound(TypeBound<'tree>), TypeList(TypeList<'tree>), TypeParameter(TypeParameter<'tree>), TypeParameters(TypeParameters<'tree>), TypePattern(TypePattern<'tree>), UnaryExpression(UnaryExpression<'tree>), UpdateExpression(UpdateExpression<'tree>), UsesModuleDirective(UsesModuleDirective<'tree>), VariableDeclarator(VariableDeclarator<'tree>), WhileStatement(WhileStatement<'tree>), Wildcard(Wildcard<'tree>), YieldStatement(YieldStatement<'tree>), BinaryIntegerLiteral(BinaryIntegerLiteral<'tree>), BlockComment(BlockComment<'tree>), BooleanType(BooleanType<'tree>), CharacterLiteral(CharacterLiteral<'tree>), DecimalFloatingPointLiteral(DecimalFloatingPointLiteral<'tree>), DecimalIntegerLiteral(DecimalIntegerLiteral<'tree>), EscapeSequence(EscapeSequence<'tree>), False(False<'tree>), HexFloatingPointLiteral(HexFloatingPointLiteral<'tree>), HexIntegerLiteral(HexIntegerLiteral<'tree>), Identifier(Identifier<'tree>), LineComment(LineComment<'tree>), NullLiteral(NullLiteral<'tree>), OctalIntegerLiteral(OctalIntegerLiteral<'tree>), StringFragment(StringFragment<'tree>), Super(Super<'tree>), This(This<'tree>), True(True<'tree>), TypeIdentifier(TypeIdentifier<'tree>), UnderscorePattern(UnderscorePattern<'tree>), VoidType(VoidType<'tree>), Unknown(Node<'tree>),
}

Variants§

§

Literal(Literal<'tree>)

§

SimpleType(SimpleType<'tree>)

§

Type(Type<'tree>)

§

UnannotatedType(UnannotatedType<'tree>)

§

Declaration(Declaration<'tree>)

§

Expression(Expression<'tree>)

§

ModuleDirective(ModuleDirective<'tree>)

§

PrimaryExpression(PrimaryExpression<'tree>)

§

Statement(Statement<'tree>)

§

AnnotatedType(AnnotatedType<'tree>)

§

Annotation(Annotation<'tree>)

§

AnnotationArgumentList(AnnotationArgumentList<'tree>)

§

AnnotationTypeBody(AnnotationTypeBody<'tree>)

§

AnnotationTypeDeclaration(AnnotationTypeDeclaration<'tree>)

§

AnnotationTypeElementDeclaration(AnnotationTypeElementDeclaration<'tree>)

§

ArgumentList(ArgumentList<'tree>)

§

ArrayAccess(ArrayAccess<'tree>)

§

ArrayCreationExpression(ArrayCreationExpression<'tree>)

§

ArrayInitializer(ArrayInitializer<'tree>)

§

ArrayType(ArrayType<'tree>)

§

AssertStatement(AssertStatement<'tree>)

§

AssignmentExpression(AssignmentExpression<'tree>)

§

Asterisk(Asterisk<'tree>)

§

BinaryExpression(BinaryExpression<'tree>)

§

Block(Block<'tree>)

§

BreakStatement(BreakStatement<'tree>)

§

CastExpression(CastExpression<'tree>)

§

CatchClause(CatchClause<'tree>)

§

CatchFormalParameter(CatchFormalParameter<'tree>)

§

CatchType(CatchType<'tree>)

§

ClassBody(ClassBody<'tree>)

§

ClassDeclaration(ClassDeclaration<'tree>)

§

ClassLiteral(ClassLiteral<'tree>)

§

CompactConstructorDeclaration(CompactConstructorDeclaration<'tree>)

§

ConstantDeclaration(ConstantDeclaration<'tree>)

§

ConstructorBody(ConstructorBody<'tree>)

§

ConstructorDeclaration(ConstructorDeclaration<'tree>)

§

ContinueStatement(ContinueStatement<'tree>)

§

Dimensions(Dimensions<'tree>)

§

DimensionsExpr(DimensionsExpr<'tree>)

§

DoStatement(DoStatement<'tree>)

§

ElementValueArrayInitializer(ElementValueArrayInitializer<'tree>)

§

ElementValuePair(ElementValuePair<'tree>)

§

EnhancedForStatement(EnhancedForStatement<'tree>)

§

EnumBody(EnumBody<'tree>)

§

EnumBodyDeclarations(EnumBodyDeclarations<'tree>)

§

EnumConstant(EnumConstant<'tree>)

§

EnumDeclaration(EnumDeclaration<'tree>)

§

ExplicitConstructorInvocation(ExplicitConstructorInvocation<'tree>)

§

ExportsModuleDirective(ExportsModuleDirective<'tree>)

§

ExpressionStatement(ExpressionStatement<'tree>)

§

ExtendsInterfaces(ExtendsInterfaces<'tree>)

§

FieldAccess(FieldAccess<'tree>)

§

FieldDeclaration(FieldDeclaration<'tree>)

§

FinallyClause(FinallyClause<'tree>)

§

FloatingPointType(FloatingPointType<'tree>)

§

ForStatement(ForStatement<'tree>)

§

FormalParameter(FormalParameter<'tree>)

§

FormalParameters(FormalParameters<'tree>)

§

GenericType(GenericType<'tree>)

§

Guard(Guard<'tree>)

§

IfStatement(IfStatement<'tree>)

§

ImportDeclaration(ImportDeclaration<'tree>)

§

InferredParameters(InferredParameters<'tree>)

§

InstanceofExpression(InstanceofExpression<'tree>)

§

IntegralType(IntegralType<'tree>)

§

InterfaceBody(InterfaceBody<'tree>)

§

InterfaceDeclaration(InterfaceDeclaration<'tree>)

§

LabeledStatement(LabeledStatement<'tree>)

§

LambdaExpression(LambdaExpression<'tree>)

§

LocalVariableDeclaration(LocalVariableDeclaration<'tree>)

§

MarkerAnnotation(MarkerAnnotation<'tree>)

§

MethodDeclaration(MethodDeclaration<'tree>)

§

MethodInvocation(MethodInvocation<'tree>)

§

MethodReference(MethodReference<'tree>)

§

Modifiers(Modifiers<'tree>)

§

ModuleBody(ModuleBody<'tree>)

§

ModuleDeclaration(ModuleDeclaration<'tree>)

§

MultilineStringFragment(MultilineStringFragment<'tree>)

§

ObjectCreationExpression(ObjectCreationExpression<'tree>)

§

OpensModuleDirective(OpensModuleDirective<'tree>)

§

PackageDeclaration(PackageDeclaration<'tree>)

§

ParenthesizedExpression(ParenthesizedExpression<'tree>)

§

Pattern(Pattern<'tree>)

§

Permits(Permits<'tree>)

§

Program(Program<'tree>)

§

ProvidesModuleDirective(ProvidesModuleDirective<'tree>)

§

ReceiverParameter(ReceiverParameter<'tree>)

§

RecordDeclaration(RecordDeclaration<'tree>)

§

RecordPattern(RecordPattern<'tree>)

§

RecordPatternBody(RecordPatternBody<'tree>)

§

RecordPatternComponent(RecordPatternComponent<'tree>)

§

RequiresModifier(RequiresModifier<'tree>)

§

RequiresModuleDirective(RequiresModuleDirective<'tree>)

§

Resource(Resource<'tree>)

§

ResourceSpecification(ResourceSpecification<'tree>)

§

ReturnStatement(ReturnStatement<'tree>)

§

ScopedIdentifier(ScopedIdentifier<'tree>)

§

ScopedTypeIdentifier(ScopedTypeIdentifier<'tree>)

§

SpreadParameter(SpreadParameter<'tree>)

§

StaticInitializer(StaticInitializer<'tree>)

§

StringInterpolation(StringInterpolation<'tree>)

§

StringLiteral(StringLiteral<'tree>)

§

SuperInterfaces(SuperInterfaces<'tree>)

§

Superclass(Superclass<'tree>)

§

SwitchBlock(SwitchBlock<'tree>)

§

SwitchBlockStatementGroup(SwitchBlockStatementGroup<'tree>)

§

SwitchExpression(SwitchExpression<'tree>)

§

SwitchLabel(SwitchLabel<'tree>)

§

SwitchRule(SwitchRule<'tree>)

§

SynchronizedStatement(SynchronizedStatement<'tree>)

§

TemplateExpression(TemplateExpression<'tree>)

§

TernaryExpression(TernaryExpression<'tree>)

§

ThrowStatement(ThrowStatement<'tree>)

§

Throws(Throws<'tree>)

§

TryStatement(TryStatement<'tree>)

§

TryWithResourcesStatement(TryWithResourcesStatement<'tree>)

§

TypeArguments(TypeArguments<'tree>)

§

TypeBound(TypeBound<'tree>)

§

TypeList(TypeList<'tree>)

§

TypeParameter(TypeParameter<'tree>)

§

TypeParameters(TypeParameters<'tree>)

§

TypePattern(TypePattern<'tree>)

§

UnaryExpression(UnaryExpression<'tree>)

§

UpdateExpression(UpdateExpression<'tree>)

§

UsesModuleDirective(UsesModuleDirective<'tree>)

§

VariableDeclarator(VariableDeclarator<'tree>)

§

WhileStatement(WhileStatement<'tree>)

§

Wildcard(Wildcard<'tree>)

§

YieldStatement(YieldStatement<'tree>)

§

BinaryIntegerLiteral(BinaryIntegerLiteral<'tree>)

§

BlockComment(BlockComment<'tree>)

§

BooleanType(BooleanType<'tree>)

§

CharacterLiteral(CharacterLiteral<'tree>)

§

DecimalFloatingPointLiteral(DecimalFloatingPointLiteral<'tree>)

§

DecimalIntegerLiteral(DecimalIntegerLiteral<'tree>)

§

EscapeSequence(EscapeSequence<'tree>)

§

False(False<'tree>)

§

HexFloatingPointLiteral(HexFloatingPointLiteral<'tree>)

§

HexIntegerLiteral(HexIntegerLiteral<'tree>)

§

Identifier(Identifier<'tree>)

§

LineComment(LineComment<'tree>)

§

NullLiteral(NullLiteral<'tree>)

§

OctalIntegerLiteral(OctalIntegerLiteral<'tree>)

§

StringFragment(StringFragment<'tree>)

§

Super(Super<'tree>)

§

This(This<'tree>)

§

True(True<'tree>)

§

TypeIdentifier(TypeIdentifier<'tree>)

§

UnderscorePattern(UnderscorePattern<'tree>)

§

VoidType(VoidType<'tree>)

§

Unknown(Node<'tree>)

Implementations§

Source§

impl<'tree> AnyNode<'tree>

Source

pub fn from_node(node: Node<'tree>, src: &'tree [u8]) -> Self

Trait Implementations§

Source§

impl<'tree> Clone for AnyNode<'tree>

Source§

fn clone(&self) -> AnyNode<'tree>

Returns a duplicate 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<'tree> Debug for AnyNode<'tree>

Source§

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

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

impl Spanned for AnyNode<'_>

Source§

fn span(&self) -> Span

Source§

fn start(&self) -> Point

Source§

fn end(&self) -> Point

Auto Trait Implementations§

§

impl<'tree> Freeze for AnyNode<'tree>

§

impl<'tree> RefUnwindSafe for AnyNode<'tree>

§

impl<'tree> Send for AnyNode<'tree>

§

impl<'tree> Sync for AnyNode<'tree>

§

impl<'tree> Unpin for AnyNode<'tree>

§

impl<'tree> UnsafeUnpin for AnyNode<'tree>

§

impl<'tree> UnwindSafe for AnyNode<'tree>

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.