cairo_lang_syntax::node

Trait TypedSyntaxNode

Source
pub trait TypedSyntaxNode {
    type StablePtr: TypedStablePtr;
    type Green;

    const OPTIONAL_KIND: Option<SyntaxKind>;

    // Required methods
    fn missing(db: &dyn SyntaxGroup) -> Self::Green;
    fn from_syntax_node(db: &dyn SyntaxGroup, node: SyntaxNode) -> Self;
    fn as_syntax_node(&self) -> SyntaxNode;
    fn stable_ptr(&self) -> Self::StablePtr;
}
Expand description

Trait for the typed view of the syntax tree. All the internal node implementations are under the ast module.

Required Associated Constants§

Source

const OPTIONAL_KIND: Option<SyntaxKind>

The relevant SyntaxKind. None for enums.

Required Associated Types§

Required Methods§

Source

fn missing(db: &dyn SyntaxGroup) -> Self::Green

Source

fn from_syntax_node(db: &dyn SyntaxGroup, node: SyntaxNode) -> Self

Source

fn as_syntax_node(&self) -> SyntaxNode

Source

fn stable_ptr(&self) -> Self::StablePtr

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl TypedSyntaxNode for ArgClause

Source§

impl TypedSyntaxNode for BinaryOperator

Source§

impl TypedSyntaxNode for BlockOrIf

Source§

impl TypedSyntaxNode for ClosureParamWrapper

Source§

impl TypedSyntaxNode for Condition

Source§

impl TypedSyntaxNode for Expr

Source§

impl TypedSyntaxNode for GenericArg

Source§

impl TypedSyntaxNode for GenericArgValue

Source§

impl TypedSyntaxNode for GenericParam

Source§

impl TypedSyntaxNode for ImplItem

Source§

impl TypedSyntaxNode for MaybeImplBody

Source§

impl TypedSyntaxNode for MaybeModuleBody

Source§

impl TypedSyntaxNode for MaybeTraitBody

Source§

impl TypedSyntaxNode for MaybeTraitFunctionBody

Source§

impl TypedSyntaxNode for Modifier

Source§

impl TypedSyntaxNode for ModuleItem

Source§

impl TypedSyntaxNode for OptionAliasClause

Source§

impl TypedSyntaxNode for OptionArgListParenthesized

Source§

impl TypedSyntaxNode for OptionAssociatedItemConstraints

Source§

impl TypedSyntaxNode for OptionElseClause

Source§

impl TypedSyntaxNode for OptionExprClause

Source§

impl TypedSyntaxNode for OptionFixedSizeArraySize

Source§

impl TypedSyntaxNode for OptionImplicitsClause

Source§

impl TypedSyntaxNode for OptionPatternEnumInnerPattern

Source§

impl TypedSyntaxNode for OptionReturnTypeClause

Source§

impl TypedSyntaxNode for OptionStructArgExpr

Source§

impl TypedSyntaxNode for OptionTerminalColonColon

Source§

impl TypedSyntaxNode for OptionTerminalNoPanic

Source§

impl TypedSyntaxNode for OptionTerminalSemicolon

Source§

impl TypedSyntaxNode for OptionTypeClause

Source§

impl TypedSyntaxNode for OptionVisibilityPubArgumentClause

Source§

impl TypedSyntaxNode for OptionWrappedGenericParamList

Source§

impl TypedSyntaxNode for PathSegment

Source§

impl TypedSyntaxNode for Pattern

Source§

impl TypedSyntaxNode for PatternStructParam

Source§

impl TypedSyntaxNode for SkippedNode

Source§

impl TypedSyntaxNode for Statement

Source§

impl TypedSyntaxNode for StructArg

Source§

impl TypedSyntaxNode for TokenNode

Source§

impl TypedSyntaxNode for TraitItem

Source§

impl TypedSyntaxNode for Trivium

Source§

impl TypedSyntaxNode for UnaryOperator

Source§

impl TypedSyntaxNode for UsePath

Source§

impl TypedSyntaxNode for Visibility

Source§

impl TypedSyntaxNode for WrappedArgList

Source§

impl TypedSyntaxNode for AliasClause

Source§

impl TypedSyntaxNode for Arg

Source§

impl TypedSyntaxNode for ArgClauseFieldInitShorthand

Source§

impl TypedSyntaxNode for ArgClauseNamed

Source§

impl TypedSyntaxNode for ArgClauseUnnamed

Source§

impl TypedSyntaxNode for ArgList

Source§

impl TypedSyntaxNode for ArgListBraced

Source§

impl TypedSyntaxNode for ArgListBracketed

Source§

impl TypedSyntaxNode for ArgListParenthesized

Source§

impl TypedSyntaxNode for AssociatedItemConstraint

Source§

impl TypedSyntaxNode for AssociatedItemConstraintList

Source§

impl TypedSyntaxNode for AssociatedItemConstraints

Source§

impl TypedSyntaxNode for Attribute

Source§

impl TypedSyntaxNode for AttributeList

Source§

impl TypedSyntaxNode for ClosureParamWrapperNAry

Source§

impl TypedSyntaxNode for ConditionExpr

Source§

impl TypedSyntaxNode for ConditionLet

Source§

impl TypedSyntaxNode for ElseClause

Source§

impl TypedSyntaxNode for ExprBinary

Source§

impl TypedSyntaxNode for ExprBlock

Source§

impl TypedSyntaxNode for ExprClause

Source§

impl TypedSyntaxNode for ExprClosure

Source§

impl TypedSyntaxNode for ExprErrorPropagate

Source§

impl TypedSyntaxNode for ExprFieldInitShorthand

Source§

impl TypedSyntaxNode for ExprFixedSizeArray

Source§

impl TypedSyntaxNode for ExprFor

Source§

impl TypedSyntaxNode for ExprFunctionCall

Source§

impl TypedSyntaxNode for ExprIf

Source§

impl TypedSyntaxNode for ExprIndexed

Source§

impl TypedSyntaxNode for ExprInlineMacro

Source§

impl TypedSyntaxNode for ExprList

Source§

impl TypedSyntaxNode for ExprListParenthesized

Source§

impl TypedSyntaxNode for ExprLoop

Source§

impl TypedSyntaxNode for ExprMatch

Source§

impl TypedSyntaxNode for ExprMissing

Source§

impl TypedSyntaxNode for ExprParenthesized

Source§

impl TypedSyntaxNode for ExprPath

Source§

impl TypedSyntaxNode for ExprStructCtorCall

Source§

impl TypedSyntaxNode for ExprUnary

Source§

impl TypedSyntaxNode for ExprWhile

Source§

impl TypedSyntaxNode for FixedSizeArraySize

Source§

impl TypedSyntaxNode for FunctionDeclaration

Source§

impl TypedSyntaxNode for FunctionSignature

Source§

impl TypedSyntaxNode for FunctionWithBody

Source§

impl TypedSyntaxNode for GenericArgList

Source§

impl TypedSyntaxNode for GenericArgNamed

Source§

impl TypedSyntaxNode for GenericArgUnnamed

Source§

impl TypedSyntaxNode for GenericArgValueExpr

Source§

impl TypedSyntaxNode for GenericArgs

Source§

impl TypedSyntaxNode for GenericParamConst

Source§

impl TypedSyntaxNode for GenericParamImplAnonymous

Source§

impl TypedSyntaxNode for GenericParamImplNamed

Source§

impl TypedSyntaxNode for GenericParamList

Source§

impl TypedSyntaxNode for GenericParamNegativeImpl

Source§

impl TypedSyntaxNode for GenericParamType

Source§

impl TypedSyntaxNode for ImplBody

Source§

impl TypedSyntaxNode for ImplItemList

Source§

impl TypedSyntaxNode for ImplItemMissing

Source§

impl TypedSyntaxNode for ImplicitsClause

Source§

impl TypedSyntaxNode for ImplicitsList

Source§

impl TypedSyntaxNode for ItemConstant

Source§

impl TypedSyntaxNode for ItemEnum

Source§

impl TypedSyntaxNode for ItemExternFunction

Source§

impl TypedSyntaxNode for ItemExternType

Source§

impl TypedSyntaxNode for ItemHeaderDoc

Source§

impl TypedSyntaxNode for ItemImpl

Source§

impl TypedSyntaxNode for ItemImplAlias

Source§

impl TypedSyntaxNode for ItemInlineMacro

Source§

impl TypedSyntaxNode for ItemModule

Source§

impl TypedSyntaxNode for ItemStruct

Source§

impl TypedSyntaxNode for ItemTrait

Source§

impl TypedSyntaxNode for ItemTypeAlias

Source§

impl TypedSyntaxNode for ItemUse

Source§

impl TypedSyntaxNode for MatchArm

Source§

impl TypedSyntaxNode for MatchArms

Source§

impl TypedSyntaxNode for Member

Source§

impl TypedSyntaxNode for MemberList

Source§

impl TypedSyntaxNode for ModifierList

Source§

impl TypedSyntaxNode for ModuleBody

Source§

impl TypedSyntaxNode for ModuleItemList

Source§

impl TypedSyntaxNode for ModuleItemMissing

Source§

impl TypedSyntaxNode for OptionAliasClauseEmpty

Source§

impl TypedSyntaxNode for OptionArgListParenthesizedEmpty

Source§

impl TypedSyntaxNode for OptionAssociatedItemConstraintsEmpty

Source§

impl TypedSyntaxNode for OptionElseClauseEmpty

Source§

impl TypedSyntaxNode for OptionExprClauseEmpty

Source§

impl TypedSyntaxNode for OptionFixedSizeArraySizeEmpty

Source§

impl TypedSyntaxNode for OptionImplicitsClauseEmpty

Source§

impl TypedSyntaxNode for OptionPatternEnumInnerPatternEmpty

Source§

impl TypedSyntaxNode for OptionReturnTypeClauseEmpty

Source§

impl TypedSyntaxNode for OptionStructArgExprEmpty

Source§

impl TypedSyntaxNode for OptionTerminalColonColonEmpty

Source§

impl TypedSyntaxNode for OptionTerminalNoPanicEmpty

Source§

impl TypedSyntaxNode for OptionTerminalSemicolonEmpty

Source§

impl TypedSyntaxNode for OptionTypeClauseEmpty

Source§

impl TypedSyntaxNode for OptionVisibilityPubArgumentClauseEmpty

Source§

impl TypedSyntaxNode for OptionWrappedGenericParamListEmpty

Source§

impl TypedSyntaxNode for Param

Source§

impl TypedSyntaxNode for ParamList

Source§

impl TypedSyntaxNode for PathSegmentSimple

Source§

impl TypedSyntaxNode for PathSegmentWithGenericArgs

Source§

impl TypedSyntaxNode for PatternEnum

Source§

impl TypedSyntaxNode for PatternEnumInnerPattern

Source§

impl TypedSyntaxNode for PatternFixedSizeArray

Source§

impl TypedSyntaxNode for PatternIdentifier

Source§

impl TypedSyntaxNode for PatternList

Source§

impl TypedSyntaxNode for PatternListOr

Source§

impl TypedSyntaxNode for PatternStruct

Source§

impl TypedSyntaxNode for PatternStructParamList

Source§

impl TypedSyntaxNode for PatternStructParamWithExpr

Source§

impl TypedSyntaxNode for PatternTuple

Source§

impl TypedSyntaxNode for ReturnTypeClause

Source§

impl TypedSyntaxNode for StatementBreak

Source§

impl TypedSyntaxNode for StatementContinue

Source§

impl TypedSyntaxNode for StatementExpr

Source§

impl TypedSyntaxNode for StatementItem

Source§

impl TypedSyntaxNode for StatementLet

Source§

impl TypedSyntaxNode for StatementList

Source§

impl TypedSyntaxNode for StatementMissing

Source§

impl TypedSyntaxNode for StatementReturn

Source§

impl TypedSyntaxNode for StructArgExpr

Source§

impl TypedSyntaxNode for StructArgList

Source§

impl TypedSyntaxNode for StructArgListBraced

Source§

impl TypedSyntaxNode for StructArgSingle

Source§

impl TypedSyntaxNode for StructArgTail

Source§

impl TypedSyntaxNode for SyntaxFile

Source§

impl TypedSyntaxNode for TerminalAnd

Source§

impl TypedSyntaxNode for TerminalAndAnd

Source§

impl TypedSyntaxNode for TerminalArrow

Source§

impl TypedSyntaxNode for TerminalAs

Source§

impl TypedSyntaxNode for TerminalAt

Source§

impl TypedSyntaxNode for TerminalBadCharacters

Source§

impl TypedSyntaxNode for TerminalBitNot

Source§

impl TypedSyntaxNode for TerminalBreak

Source§

impl TypedSyntaxNode for TerminalColon

Source§

impl TypedSyntaxNode for TerminalColonColon

Source§

impl TypedSyntaxNode for TerminalComma

Source§

impl TypedSyntaxNode for TerminalConst

Source§

impl TypedSyntaxNode for TerminalContinue

Source§

impl TypedSyntaxNode for TerminalDiv

Source§

impl TypedSyntaxNode for TerminalDivEq

Source§

impl TypedSyntaxNode for TerminalDot

Source§

impl TypedSyntaxNode for TerminalDotDot

Source§

impl TypedSyntaxNode for TerminalElse

Source§

impl TypedSyntaxNode for TerminalEmpty

Source§

impl TypedSyntaxNode for TerminalEndOfFile

Source§

impl TypedSyntaxNode for TerminalEnum

Source§

impl TypedSyntaxNode for TerminalEq

Source§

impl TypedSyntaxNode for TerminalEqEq

Source§

impl TypedSyntaxNode for TerminalExtern

Source§

impl TypedSyntaxNode for TerminalFalse

Source§

impl TypedSyntaxNode for TerminalFor

Source§

impl TypedSyntaxNode for TerminalFunction

Source§

impl TypedSyntaxNode for TerminalGE

Source§

impl TypedSyntaxNode for TerminalGT

Source§

impl TypedSyntaxNode for TerminalHash

Source§

impl TypedSyntaxNode for TerminalIdentifier

Source§

impl TypedSyntaxNode for TerminalIf

Source§

impl TypedSyntaxNode for TerminalImpl

Source§

impl TypedSyntaxNode for TerminalImplicits

Source§

impl TypedSyntaxNode for TerminalLBrace

Source§

impl TypedSyntaxNode for TerminalLBrack

Source§

impl TypedSyntaxNode for TerminalLE

Source§

impl TypedSyntaxNode for TerminalLParen

Source§

impl TypedSyntaxNode for TerminalLT

Source§

impl TypedSyntaxNode for TerminalLet

Source§

impl TypedSyntaxNode for TerminalLiteralNumber

Source§

impl TypedSyntaxNode for TerminalLoop

Source§

impl TypedSyntaxNode for TerminalMatch

Source§

impl TypedSyntaxNode for TerminalMatchArrow

Source§

impl TypedSyntaxNode for TerminalMinus

Source§

impl TypedSyntaxNode for TerminalMinusEq

Source§

impl TypedSyntaxNode for TerminalMod

Source§

impl TypedSyntaxNode for TerminalModEq

Source§

impl TypedSyntaxNode for TerminalModule

Source§

impl TypedSyntaxNode for TerminalMul

Source§

impl TypedSyntaxNode for TerminalMulEq

Source§

impl TypedSyntaxNode for TerminalMut

Source§

impl TypedSyntaxNode for TerminalNeq

Source§

impl TypedSyntaxNode for TerminalNoPanic

Source§

impl TypedSyntaxNode for TerminalNot

Source§

impl TypedSyntaxNode for TerminalOf

Source§

impl TypedSyntaxNode for TerminalOr

Source§

impl TypedSyntaxNode for TerminalOrOr

Source§

impl TypedSyntaxNode for TerminalPlus

Source§

impl TypedSyntaxNode for TerminalPlusEq

Source§

impl TypedSyntaxNode for TerminalPub

Source§

impl TypedSyntaxNode for TerminalQuestionMark

Source§

impl TypedSyntaxNode for TerminalRBrace

Source§

impl TypedSyntaxNode for TerminalRBrack

Source§

impl TypedSyntaxNode for TerminalRParen

Source§

impl TypedSyntaxNode for TerminalRef

Source§

impl TypedSyntaxNode for TerminalReturn

Source§

impl TypedSyntaxNode for TerminalSemicolon

Source§

impl TypedSyntaxNode for TerminalShortString

Source§

impl TypedSyntaxNode for TerminalString

Source§

impl TypedSyntaxNode for TerminalStruct

Source§

impl TypedSyntaxNode for TerminalTrait

Source§

impl TypedSyntaxNode for TerminalTrue

Source§

impl TypedSyntaxNode for TerminalType

Source§

impl TypedSyntaxNode for TerminalUnderscore

Source§

impl TypedSyntaxNode for TerminalUse

Source§

impl TypedSyntaxNode for TerminalWhile

Source§

impl TypedSyntaxNode for TerminalXor

Source§

impl TypedSyntaxNode for TokenAnd

Source§

impl TypedSyntaxNode for TokenAndAnd

Source§

impl TypedSyntaxNode for TokenArrow

Source§

impl TypedSyntaxNode for TokenAs

Source§

impl TypedSyntaxNode for TokenAt

Source§

impl TypedSyntaxNode for TokenBadCharacters

Source§

impl TypedSyntaxNode for TokenBitNot

Source§

impl TypedSyntaxNode for TokenBreak

Source§

impl TypedSyntaxNode for TokenColon

Source§

impl TypedSyntaxNode for TokenColonColon

Source§

impl TypedSyntaxNode for TokenComma

Source§

impl TypedSyntaxNode for TokenConst

Source§

impl TypedSyntaxNode for TokenContinue

Source§

impl TypedSyntaxNode for TokenDiv

Source§

impl TypedSyntaxNode for TokenDivEq

Source§

impl TypedSyntaxNode for TokenDot

Source§

impl TypedSyntaxNode for TokenDotDot

Source§

impl TypedSyntaxNode for TokenElse

Source§

impl TypedSyntaxNode for TokenEmpty

Source§

impl TypedSyntaxNode for TokenEndOfFile

Source§

impl TypedSyntaxNode for TokenEnum

Source§

impl TypedSyntaxNode for TokenEq

Source§

impl TypedSyntaxNode for TokenEqEq

Source§

impl TypedSyntaxNode for TokenExtern

Source§

impl TypedSyntaxNode for TokenFalse

Source§

impl TypedSyntaxNode for TokenFor

Source§

impl TypedSyntaxNode for TokenFunction

Source§

impl TypedSyntaxNode for TokenGE

Source§

impl TypedSyntaxNode for TokenGT

Source§

impl TypedSyntaxNode for TokenHash

Source§

impl TypedSyntaxNode for TokenIdentifier

Source§

impl TypedSyntaxNode for TokenIf

Source§

impl TypedSyntaxNode for TokenImpl

Source§

impl TypedSyntaxNode for TokenImplicits

Source§

impl TypedSyntaxNode for TokenLBrace

Source§

impl TypedSyntaxNode for TokenLBrack

Source§

impl TypedSyntaxNode for TokenLE

Source§

impl TypedSyntaxNode for TokenLParen

Source§

impl TypedSyntaxNode for TokenLT

Source§

impl TypedSyntaxNode for TokenLet

Source§

impl TypedSyntaxNode for TokenLiteralNumber

Source§

impl TypedSyntaxNode for TokenLoop

Source§

impl TypedSyntaxNode for TokenMatch

Source§

impl TypedSyntaxNode for TokenMatchArrow

Source§

impl TypedSyntaxNode for TokenMinus

Source§

impl TypedSyntaxNode for TokenMinusEq

Source§

impl TypedSyntaxNode for TokenMissing

Source§

impl TypedSyntaxNode for TokenMod

Source§

impl TypedSyntaxNode for TokenModEq

Source§

impl TypedSyntaxNode for TokenModule

Source§

impl TypedSyntaxNode for TokenMul

Source§

impl TypedSyntaxNode for TokenMulEq

Source§

impl TypedSyntaxNode for TokenMut

Source§

impl TypedSyntaxNode for TokenNeq

Source§

impl TypedSyntaxNode for TokenNewline

Source§

impl TypedSyntaxNode for TokenNoPanic

Source§

impl TypedSyntaxNode for TokenNot

Source§

impl TypedSyntaxNode for TokenOf

Source§

impl TypedSyntaxNode for TokenOr

Source§

impl TypedSyntaxNode for TokenOrOr

Source§

impl TypedSyntaxNode for TokenPlus

Source§

impl TypedSyntaxNode for TokenPlusEq

Source§

impl TypedSyntaxNode for TokenPub

Source§

impl TypedSyntaxNode for TokenQuestionMark

Source§

impl TypedSyntaxNode for TokenRBrace

Source§

impl TypedSyntaxNode for TokenRBrack

Source§

impl TypedSyntaxNode for TokenRParen

Source§

impl TypedSyntaxNode for TokenRef

Source§

impl TypedSyntaxNode for TokenReturn

Source§

impl TypedSyntaxNode for TokenSemicolon

Source§

impl TypedSyntaxNode for TokenShortString

Source§

impl TypedSyntaxNode for TokenSingleLineComment

Source§

impl TypedSyntaxNode for TokenSingleLineDocComment

Source§

impl TypedSyntaxNode for TokenSingleLineInnerComment

Source§

impl TypedSyntaxNode for TokenSkipped

Source§

impl TypedSyntaxNode for TokenString

Source§

impl TypedSyntaxNode for TokenStruct

Source§

impl TypedSyntaxNode for TokenTrait

Source§

impl TypedSyntaxNode for TokenTrue

Source§

impl TypedSyntaxNode for TokenType

Source§

impl TypedSyntaxNode for TokenUnderscore

Source§

impl TypedSyntaxNode for TokenUse

Source§

impl TypedSyntaxNode for TokenWhile

Source§

impl TypedSyntaxNode for TokenWhitespace

Source§

impl TypedSyntaxNode for TokenXor

Source§

impl TypedSyntaxNode for TraitBody

Source§

impl TypedSyntaxNode for TraitItemConstant

Source§

impl TypedSyntaxNode for TraitItemFunction

Source§

impl TypedSyntaxNode for TraitItemImpl

Source§

impl TypedSyntaxNode for TraitItemList

Source§

impl TypedSyntaxNode for TraitItemMissing

Source§

impl TypedSyntaxNode for TraitItemType

Source§

impl TypedSyntaxNode for Trivia

Source§

impl TypedSyntaxNode for TriviumSkippedNode

Source§

impl TypedSyntaxNode for TypeClause

Source§

impl TypedSyntaxNode for UsePathLeaf

Source§

impl TypedSyntaxNode for UsePathList

Source§

impl TypedSyntaxNode for UsePathMulti

Source§

impl TypedSyntaxNode for UsePathSingle

Source§

impl TypedSyntaxNode for UsePathStar

Source§

impl TypedSyntaxNode for Variant

Source§

impl TypedSyntaxNode for VariantList

Source§

impl TypedSyntaxNode for VisibilityDefault

Source§

impl TypedSyntaxNode for VisibilityPub

Source§

impl TypedSyntaxNode for VisibilityPubArgumentClause

Source§

impl TypedSyntaxNode for WrappedArgListMissing

Source§

impl TypedSyntaxNode for WrappedGenericParamList