Skip to main content

AnyNode

Enum AnyNode 

Source
pub enum AnyNode<'tree> {
Show 130 variants CompoundStatement(CompoundStatement<'tree>), SimpleStatement(SimpleStatement<'tree>), Expression(Expression<'tree>), Parameter(Parameter<'tree>), Pattern(Pattern<'tree>), PrimaryExpression(PrimaryExpression<'tree>), AliasedImport(AliasedImport<'tree>), ArgumentList(ArgumentList<'tree>), AsPattern(AsPattern<'tree>), AssertStatement(AssertStatement<'tree>), Assignment(Assignment<'tree>), Attribute(Attribute<'tree>), AugmentedAssignment(AugmentedAssignment<'tree>), Await(Await<'tree>), BinaryOperator(BinaryOperator<'tree>), Block(Block<'tree>), BooleanOperator(BooleanOperator<'tree>), BreakStatement(BreakStatement<'tree>), Call(Call<'tree>), CaseClause(CaseClause<'tree>), CasePattern(CasePattern<'tree>), Chevron(Chevron<'tree>), ClassDefinition(ClassDefinition<'tree>), ClassPattern(ClassPattern<'tree>), ComparisonOperator(ComparisonOperator<'tree>), ComplexPattern(ComplexPattern<'tree>), ConcatenatedString(ConcatenatedString<'tree>), ConditionalExpression(ConditionalExpression<'tree>), ConstrainedType(ConstrainedType<'tree>), ContinueStatement(ContinueStatement<'tree>), DecoratedDefinition(DecoratedDefinition<'tree>), Decorator(Decorator<'tree>), DefaultParameter(DefaultParameter<'tree>), DeleteStatement(DeleteStatement<'tree>), DictPattern(DictPattern<'tree>), Dictionary(Dictionary<'tree>), DictionaryComprehension(DictionaryComprehension<'tree>), DictionarySplat(DictionarySplat<'tree>), DictionarySplatPattern(DictionarySplatPattern<'tree>), DottedName(DottedName<'tree>), ElifClause(ElifClause<'tree>), ElseClause(ElseClause<'tree>), ExceptClause(ExceptClause<'tree>), ExecStatement(ExecStatement<'tree>), ExpressionList(ExpressionList<'tree>), ExpressionStatement(ExpressionStatement<'tree>), FinallyClause(FinallyClause<'tree>), ForInClause(ForInClause<'tree>), ForStatement(ForStatement<'tree>), FormatExpression(FormatExpression<'tree>), FormatSpecifier(FormatSpecifier<'tree>), FunctionDefinition(FunctionDefinition<'tree>), FutureImportStatement(FutureImportStatement<'tree>), GeneratorExpression(GeneratorExpression<'tree>), GenericType(GenericType<'tree>), GlobalStatement(GlobalStatement<'tree>), IfClause(IfClause<'tree>), IfStatement(IfStatement<'tree>), ImportFromStatement(ImportFromStatement<'tree>), ImportPrefix(ImportPrefix<'tree>), ImportStatement(ImportStatement<'tree>), Interpolation(Interpolation<'tree>), KeywordArgument(KeywordArgument<'tree>), KeywordPattern(KeywordPattern<'tree>), KeywordSeparator(KeywordSeparator<'tree>), Lambda(Lambda<'tree>), LambdaParameters(LambdaParameters<'tree>), List(List<'tree>), ListComprehension(ListComprehension<'tree>), ListPattern(ListPattern<'tree>), ListSplat(ListSplat<'tree>), ListSplatPattern(ListSplatPattern<'tree>), MatchStatement(MatchStatement<'tree>), MemberType(MemberType<'tree>), Module(Module<'tree>), NamedExpression(NamedExpression<'tree>), NonlocalStatement(NonlocalStatement<'tree>), NotOperator(NotOperator<'tree>), Pair(Pair<'tree>), Parameters(Parameters<'tree>), ParenthesizedExpression(ParenthesizedExpression<'tree>), ParenthesizedListSplat(ParenthesizedListSplat<'tree>), PassStatement(PassStatement<'tree>), PatternList(PatternList<'tree>), PositionalSeparator(PositionalSeparator<'tree>), PrintStatement(PrintStatement<'tree>), RaiseStatement(RaiseStatement<'tree>), RelativeImport(RelativeImport<'tree>), ReturnStatement(ReturnStatement<'tree>), Set(Set<'tree>), SetComprehension(SetComprehension<'tree>), Slice(Slice<'tree>), SplatPattern(SplatPattern<'tree>), SplatType(SplatType<'tree>), String(String<'tree>), StringContent(StringContent<'tree>), Subscript(Subscript<'tree>), TryStatement(TryStatement<'tree>), Tuple(Tuple<'tree>), TuplePattern(TuplePattern<'tree>), Type(Type<'tree>), TypeAliasStatement(TypeAliasStatement<'tree>), TypeParameter(TypeParameter<'tree>), TypedDefaultParameter(TypedDefaultParameter<'tree>), TypedParameter(TypedParameter<'tree>), UnaryOperator(UnaryOperator<'tree>), UnionPattern(UnionPattern<'tree>), UnionType(UnionType<'tree>), WhileStatement(WhileStatement<'tree>), WildcardImport(WildcardImport<'tree>), WithClause(WithClause<'tree>), WithItem(WithItem<'tree>), WithStatement(WithStatement<'tree>), Yield(Yield<'tree>), Comment(Comment<'tree>), Ellipsis(Ellipsis<'tree>), EscapeInterpolation(EscapeInterpolation<'tree>), EscapeSequence(EscapeSequence<'tree>), False(False<'tree>), Float(Float<'tree>), Identifier(Identifier<'tree>), Integer(Integer<'tree>), LineContinuation(LineContinuation<'tree>), None(None<'tree>), StringEnd(StringEnd<'tree>), StringStart(StringStart<'tree>), True(True<'tree>), TypeConversion(TypeConversion<'tree>), AsPatternTarget(AsPatternTarget<'tree>), Unknown(Node<'tree>),
}

Variants§

§

CompoundStatement(CompoundStatement<'tree>)

§

SimpleStatement(SimpleStatement<'tree>)

§

Expression(Expression<'tree>)

§

Parameter(Parameter<'tree>)

§

Pattern(Pattern<'tree>)

§

PrimaryExpression(PrimaryExpression<'tree>)

§

AliasedImport(AliasedImport<'tree>)

§

ArgumentList(ArgumentList<'tree>)

§

AsPattern(AsPattern<'tree>)

§

AssertStatement(AssertStatement<'tree>)

§

Assignment(Assignment<'tree>)

§

Attribute(Attribute<'tree>)

§

AugmentedAssignment(AugmentedAssignment<'tree>)

§

Await(Await<'tree>)

§

BinaryOperator(BinaryOperator<'tree>)

§

Block(Block<'tree>)

§

BooleanOperator(BooleanOperator<'tree>)

§

BreakStatement(BreakStatement<'tree>)

§

Call(Call<'tree>)

§

CaseClause(CaseClause<'tree>)

§

CasePattern(CasePattern<'tree>)

§

Chevron(Chevron<'tree>)

§

ClassDefinition(ClassDefinition<'tree>)

§

ClassPattern(ClassPattern<'tree>)

§

ComparisonOperator(ComparisonOperator<'tree>)

§

ComplexPattern(ComplexPattern<'tree>)

§

ConcatenatedString(ConcatenatedString<'tree>)

§

ConditionalExpression(ConditionalExpression<'tree>)

§

ConstrainedType(ConstrainedType<'tree>)

§

ContinueStatement(ContinueStatement<'tree>)

§

DecoratedDefinition(DecoratedDefinition<'tree>)

§

Decorator(Decorator<'tree>)

§

DefaultParameter(DefaultParameter<'tree>)

§

DeleteStatement(DeleteStatement<'tree>)

§

DictPattern(DictPattern<'tree>)

§

Dictionary(Dictionary<'tree>)

§

DictionaryComprehension(DictionaryComprehension<'tree>)

§

DictionarySplat(DictionarySplat<'tree>)

§

DictionarySplatPattern(DictionarySplatPattern<'tree>)

§

DottedName(DottedName<'tree>)

§

ElifClause(ElifClause<'tree>)

§

ElseClause(ElseClause<'tree>)

§

ExceptClause(ExceptClause<'tree>)

§

ExecStatement(ExecStatement<'tree>)

§

ExpressionList(ExpressionList<'tree>)

§

ExpressionStatement(ExpressionStatement<'tree>)

§

FinallyClause(FinallyClause<'tree>)

§

ForInClause(ForInClause<'tree>)

§

ForStatement(ForStatement<'tree>)

§

FormatExpression(FormatExpression<'tree>)

§

FormatSpecifier(FormatSpecifier<'tree>)

§

FunctionDefinition(FunctionDefinition<'tree>)

§

FutureImportStatement(FutureImportStatement<'tree>)

§

GeneratorExpression(GeneratorExpression<'tree>)

§

GenericType(GenericType<'tree>)

§

GlobalStatement(GlobalStatement<'tree>)

§

IfClause(IfClause<'tree>)

§

IfStatement(IfStatement<'tree>)

§

ImportFromStatement(ImportFromStatement<'tree>)

§

ImportPrefix(ImportPrefix<'tree>)

§

ImportStatement(ImportStatement<'tree>)

§

Interpolation(Interpolation<'tree>)

§

KeywordArgument(KeywordArgument<'tree>)

§

KeywordPattern(KeywordPattern<'tree>)

§

KeywordSeparator(KeywordSeparator<'tree>)

§

Lambda(Lambda<'tree>)

§

LambdaParameters(LambdaParameters<'tree>)

§

List(List<'tree>)

§

ListComprehension(ListComprehension<'tree>)

§

ListPattern(ListPattern<'tree>)

§

ListSplat(ListSplat<'tree>)

§

ListSplatPattern(ListSplatPattern<'tree>)

§

MatchStatement(MatchStatement<'tree>)

§

MemberType(MemberType<'tree>)

§

Module(Module<'tree>)

§

NamedExpression(NamedExpression<'tree>)

§

NonlocalStatement(NonlocalStatement<'tree>)

§

NotOperator(NotOperator<'tree>)

§

Pair(Pair<'tree>)

§

Parameters(Parameters<'tree>)

§

ParenthesizedExpression(ParenthesizedExpression<'tree>)

§

ParenthesizedListSplat(ParenthesizedListSplat<'tree>)

§

PassStatement(PassStatement<'tree>)

§

PatternList(PatternList<'tree>)

§

PositionalSeparator(PositionalSeparator<'tree>)

§

PrintStatement(PrintStatement<'tree>)

§

RaiseStatement(RaiseStatement<'tree>)

§

RelativeImport(RelativeImport<'tree>)

§

ReturnStatement(ReturnStatement<'tree>)

§

Set(Set<'tree>)

§

SetComprehension(SetComprehension<'tree>)

§

Slice(Slice<'tree>)

§

SplatPattern(SplatPattern<'tree>)

§

SplatType(SplatType<'tree>)

§

String(String<'tree>)

§

StringContent(StringContent<'tree>)

§

Subscript(Subscript<'tree>)

§

TryStatement(TryStatement<'tree>)

§

Tuple(Tuple<'tree>)

§

TuplePattern(TuplePattern<'tree>)

§

Type(Type<'tree>)

§

TypeAliasStatement(TypeAliasStatement<'tree>)

§

TypeParameter(TypeParameter<'tree>)

§

TypedDefaultParameter(TypedDefaultParameter<'tree>)

§

TypedParameter(TypedParameter<'tree>)

§

UnaryOperator(UnaryOperator<'tree>)

§

UnionPattern(UnionPattern<'tree>)

§

UnionType(UnionType<'tree>)

§

WhileStatement(WhileStatement<'tree>)

§

WildcardImport(WildcardImport<'tree>)

§

WithClause(WithClause<'tree>)

§

WithItem(WithItem<'tree>)

§

WithStatement(WithStatement<'tree>)

§

Yield(Yield<'tree>)

§

Comment(Comment<'tree>)

§

Ellipsis(Ellipsis<'tree>)

§

EscapeInterpolation(EscapeInterpolation<'tree>)

§

EscapeSequence(EscapeSequence<'tree>)

§

False(False<'tree>)

§

Float(Float<'tree>)

§

Identifier(Identifier<'tree>)

§

Integer(Integer<'tree>)

§

LineContinuation(LineContinuation<'tree>)

§

None(None<'tree>)

§

StringEnd(StringEnd<'tree>)

§

StringStart(StringStart<'tree>)

§

True(True<'tree>)

§

TypeConversion(TypeConversion<'tree>)

§

AsPatternTarget(AsPatternTarget<'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.