Skip to main content

PrettyTree

Trait PrettyTree 

Source
pub trait PrettyTree {
    // Required method
    fn pretty_tree(&self) -> PrettyNode;
}
Expand description

Converts typed syntax into the structural presentation used by the pretty printer.

Implementations for generated nodes are emitted from syntax_schema!, so field names, punctuation, and newly added concrete node types appear in the tree without a handwritten registry. Category enums are intentionally transparent because they are storage details rather than CST nodes.

Required Methods§

Source

fn pretty_tree(&self) -> PrettyNode

Builds the presentation node for this syntax value.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T: PrettyTree + ?Sized> PrettyTree for &T

Source§

fn pretty_tree(&self) -> PrettyNode

Source§

impl<T: PrettyTree + Spanned> PrettyTree for Option<T>

Source§

fn pretty_tree(&self) -> PrettyNode

Source§

impl<T: PrettyTree + Spanned> PrettyTree for Vec<T>

Source§

fn pretty_tree(&self) -> PrettyNode

Source§

impl<T: PrettyTree> PrettyTree for Box<T>

Source§

fn pretty_tree(&self) -> PrettyNode

Implementors§

Source§

impl PrettyTree for AdjacentExpression

Source§

impl PrettyTree for AngleBarList

Source§

impl PrettyTree for AnyCell

Source§

impl PrettyTree for Array

Source§

impl PrettyTree for Assignment

Source§

impl PrettyTree for AssignmentExpr

Source§

impl PrettyTree for BinaryAssignment

Source§

impl PrettyTree for BinaryExpression

Source§

impl PrettyTree for BinaryInstallation

Source§

impl PrettyTree for BinaryOperator

Source§

impl PrettyTree for BindingPack

Source§

impl PrettyTree for BlockComment

Source§

impl PrettyTree for BreakStatement

Source§

impl PrettyTree for CatchStatement

Source§

impl PrettyTree for Collection

Source§

impl PrettyTree for Component

Source§

impl PrettyTree for ContinueStatement

Source§

impl PrettyTree for DebugClause

Source§

impl PrettyTree for DebugKeyword

Source§

impl PrettyTree for ElseClause

Source§

impl PrettyTree for EmptyComponent

Source§

impl PrettyTree for EscapeSequence

Source§

impl PrettyTree for EvaluatedAssignment

Source§

impl PrettyTree for ExceptClause

Source§

impl PrettyTree for Expr

Source§

impl PrettyTree for ExpressionCell

Source§

impl PrettyTree for FloatLiteral

Source§

impl PrettyTree for ForLoop

Source§

impl PrettyTree for IfStatement

Source§

impl PrettyTree for IntegerLiteral

Source§

impl PrettyTree for IterationRange

Source§

impl PrettyTree for LambdaExpression

Source§

impl PrettyTree for LambdaParameters

Source§

impl PrettyTree for LineComment

Source§

impl PrettyTree for List

Source§

impl PrettyTree for LocalAssignment

Source§

impl PrettyTree for LocalStructuredBinding

Source§

impl PrettyTree for LoopBody

Source§

impl PrettyTree for MutedCell

Source§

impl PrettyTree for MutedGroup

Source§

impl PrettyTree for NakedSequence

Source§

impl PrettyTree for NewStatement

Source§

impl PrettyTree for OperatorExpr

Source§

impl PrettyTree for OptionExpression

Source§

impl PrettyTree for ParenthesizedExpression

Source§

impl PrettyTree for PostfixAssignment

Source§

impl PrettyTree for PostfixExpression

Source§

impl PrettyTree for PostfixInstallation

Source§

impl PrettyTree for PostfixOperator

Source§

impl PrettyTree for PrefixAssignment

Source§

impl PrettyTree for PrefixExpression

Source§

impl PrettyTree for PrefixInstallation

Source§

impl PrettyTree for PrefixOperator

Source§

impl PrettyTree for QuoteExpression

Source§

impl PrettyTree for QuoteSpecifier

Source§

impl PrettyTree for RawStringContent

Source§

impl PrettyTree for RawStringElement

Source§

impl PrettyTree for RawStringLiteral

Source§

impl PrettyTree for ReturnStatement

Source§

impl PrettyTree for Sequence

Source§

impl PrettyTree for SequenceCell

Source§

impl PrettyTree for SequenceElement

Source§

impl PrettyTree for SourceFile

Source§

impl PrettyTree for StringContent

Source§

impl PrettyTree for StringElement

Source§

impl PrettyTree for StringLiteral

Source§

impl PrettyTree for StructuredBinding

Source§

impl PrettyTree for Symbol

Source§

impl PrettyTree for SyntaxNode

Source§

impl PrettyTree for ThenClause

Source§

impl PrettyTree for ThrowStatement

Source§

impl PrettyTree for TrapStatement

Source§

impl PrettyTree for TryFallback

Source§

impl PrettyTree for TryStatement

Source§

impl PrettyTree for WhileLoop

Source§

impl PrettyTree for _Add

Source§

impl PrettyTree for _AddAdd

Source§

impl PrettyTree for _AddAddEql

Source§

impl PrettyTree for _AddEql

Source§

impl PrettyTree for _Amp

Source§

impl PrettyTree for _AmpEql

Source§

impl PrettyTree for _And

Source§

impl PrettyTree for _AngleBarDelimiter

Source§

impl PrettyTree for _Att

Source§

impl PrettyTree for _AttAtt

Source§

impl PrettyTree for _AttAttEql

Source§

impl PrettyTree for _AttAttQsm

Source§

impl PrettyTree for _AttAttQsmEql

Source§

impl PrettyTree for _AttEql

Source§

impl PrettyTree for _Bng

Source§

impl PrettyTree for _BngEql

Source§

impl PrettyTree for _Box

Source§

impl PrettyTree for _BoxEql

Source§

impl PrettyTree for _BraceDelimiter

Source§

impl PrettyTree for _BracketDelimiter

Source§

impl PrettyTree for _BreakKeyword

Source§

impl PrettyTree for _BreakpointKeyword

Source§

impl PrettyTree for _Bsl

Source§

impl PrettyTree for _BslBsl

Source§

impl PrettyTree for _BslBslEql

Source§

impl PrettyTree for _BslEql

Source§

impl PrettyTree for _CatchKeyword

Source§

impl PrettyTree for _Cdt

Source§

impl PrettyTree for _CdtEql

Source§

impl PrettyTree for _Cma

Source§

impl PrettyTree for _Col

Source§

impl PrettyTree for _ColEql

Source§

impl PrettyTree for _ContinueKeyword

Source§

impl PrettyTree for _Crt

Source§

impl PrettyTree for _CrtBng

Source§

impl PrettyTree for _CrtCrt

Source§

impl PrettyTree for _CrtCrtEql

Source§

impl PrettyTree for _CrtEql

Source§

impl PrettyTree for _CrtGst

Source§

impl PrettyTree for _CrtGstEql

Source§

impl PrettyTree for _CrtLst

Source§

impl PrettyTree for _CrtLstEql

Source§

impl PrettyTree for _CrtMul

Source§

impl PrettyTree for _CrtMulMul

Source§

impl PrettyTree for _CrtMulMulEql

Source§

impl PrettyTree for _CrtTld

Source§

impl PrettyTree for _DoKeyword

Source§

impl PrettyTree for _Dot

Source§

impl PrettyTree for _DotDot

Source§

impl PrettyTree for _DotDotEql

Source§

impl PrettyTree for _DotDotLst

Source§

impl PrettyTree for _DotDotLstEql

Source§

impl PrettyTree for _DotQsm

Source§

impl PrettyTree for _ElapsedTimeKeyword

Source§

impl PrettyTree for _ElapsedTimingKeyword

Source§

impl PrettyTree for _ElseKeyword

Source§

impl PrettyTree for _EmptyDelimiter

Source§

impl PrettyTree for _Eql

Source§

impl PrettyTree for _EqlBngEql

Source§

impl PrettyTree for _EqlEql

Source§

impl PrettyTree for _EqlEqlEql

Source§

impl PrettyTree for _EqlEqlEqlGst

Source§

impl PrettyTree for _EqlEqlEqlGstEql

Source§

impl PrettyTree for _EqlEqlGst

Source§

impl PrettyTree for _EqlEqlGstEql

Source§

impl PrettyTree for _EqlGst

Source§

impl PrettyTree for _ExceptKeyword

Source§

impl PrettyTree for _FinishKeyword

Source§

impl PrettyTree for _ForKeyword

Source§

impl PrettyTree for _FromKeyword

Source§

impl PrettyTree for _GlobalKeyword

Source§

impl PrettyTree for _Graded

Source§

impl PrettyTree for _Gst

Source§

impl PrettyTree for _GstEql

Source§

impl PrettyTree for _GstGst

Source§

impl PrettyTree for _GstGstEql

Source§

impl PrettyTree for _Hsh

Source§

impl PrettyTree for _HshQsm

Source§

impl PrettyTree for _IfKeyword

Source§

impl PrettyTree for _InKeyword

Source§

impl PrettyTree for _ListKeyword

Source§

impl PrettyTree for _LocalKeyword

Source§

impl PrettyTree for _Lst

Source§

impl PrettyTree for _LstEql

Source§

impl PrettyTree for _LstEqlEql

Source§

impl PrettyTree for _LstEqlEqlEql

Source§

impl PrettyTree for _LstEqlEqlGst

Source§

impl PrettyTree for _LstEqlEqlGstEql

Source§

impl PrettyTree for _LstLst

Source§

impl PrettyTree for _LstLstEql

Source§

impl PrettyTree for _LstSub

Source§

impl PrettyTree for _Mod

Source§

impl PrettyTree for _ModEql

Source§

impl PrettyTree for _Mul

Source§

impl PrettyTree for _MulEql

Source§

impl PrettyTree for _MulMul

Source§

impl PrettyTree for _MulMulEql

Source§

impl PrettyTree for _NewKeyword

Source§

impl PrettyTree for _Not

Source§

impl PrettyTree for _OfKeyword

Source§

impl PrettyTree for _Or

Source§

impl PrettyTree for _ParenthesisDelimiter

Source§

impl PrettyTree for _Pip

Source§

impl PrettyTree for _PipEql

Source§

impl PrettyTree for _PipPip

Source§

impl PrettyTree for _PipPipEql

Source§

impl PrettyTree for _PipSub

Source§

impl PrettyTree for _PipSubEql

Source§

impl PrettyTree for _PipUbs

Source§

impl PrettyTree for _PipUbsEql

Source§

impl PrettyTree for _ProfileKeyword

Source§

impl PrettyTree for _Qsm

Source§

impl PrettyTree for _QsmQsm

Source§

impl PrettyTree for _QsmQsmEql

Source§

impl PrettyTree for _ReturnKeyword

Source§

impl PrettyTree for _Scl

Source§

impl PrettyTree for _SemicolonDelimiter

Source§

impl PrettyTree for _Sfp

Source§

impl PrettyTree for _SfpEql

Source§

impl PrettyTree for _ShieldKeyword

Source§

impl PrettyTree for _Slh

Source§

impl PrettyTree for _SlhEql

Source§

impl PrettyTree for _SlhSlh

Source§

impl PrettyTree for _SlhSlhEql

Source§

impl PrettyTree for _Space

Source§

impl PrettyTree for _StepKeyword

Source§

impl PrettyTree for _Sub

Source§

impl PrettyTree for _SubEql

Source§

impl PrettyTree for _SubGst

Source§

impl PrettyTree for _SymbolKeyword

Source§

impl PrettyTree for _TestKeyword

Source§

impl PrettyTree for _ThenKeyword

Source§

impl PrettyTree for _ThreadLocalKeyword

Source§

impl PrettyTree for _ThreadVariableKeyword

Source§

impl PrettyTree for _ThrowKeyword

Source§

impl PrettyTree for _TimeKeyword

Source§

impl PrettyTree for _TimingKeyword

Source§

impl PrettyTree for _Tld

Source§

impl PrettyTree for _TldEql

Source§

impl PrettyTree for _ToKeyword

Source§

impl PrettyTree for _TrapKeyword

Source§

impl PrettyTree for _TryKeyword

Source§

impl PrettyTree for _Ubs

Source§

impl PrettyTree for _UbsBng

Source§

impl PrettyTree for _UbsEql

Source§

impl PrettyTree for _UbsGst

Source§

impl PrettyTree for _UbsGstEql

Source§

impl PrettyTree for _UbsLst

Source§

impl PrettyTree for _UbsLstEql

Source§

impl PrettyTree for _UbsMul

Source§

impl PrettyTree for _UbsTld

Source§

impl PrettyTree for _WhenKeyword

Source§

impl PrettyTree for _WhileKeyword

Source§

impl PrettyTree for _Xor

Source§

impl<T: PrettyTree + Spanned> PrettyTree for Punctuated<T>