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!, 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§
Sourcefn pretty_tree(&self) -> PrettyNode
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
impl<T: PrettyTree + ?Sized> PrettyTree for &T
fn pretty_tree(&self) -> PrettyNode
Source§impl<T: PrettyTree + Spanned> PrettyTree for Option<T>
impl<T: PrettyTree + Spanned> PrettyTree for Option<T>
fn pretty_tree(&self) -> PrettyNode
Source§impl<T: PrettyTree + Spanned> PrettyTree for Vec<T>
impl<T: PrettyTree + Spanned> PrettyTree for Vec<T>
fn pretty_tree(&self) -> PrettyNode
Source§impl<T: PrettyTree> PrettyTree for Box<T>
impl<T: PrettyTree> PrettyTree for Box<T>
fn pretty_tree(&self) -> PrettyNode
Implementors§
impl PrettyTree for Adj
impl PrettyTree for AdjacentExpr
impl PrettyTree for AngleBarList
impl PrettyTree for Array
impl PrettyTree for Assignment
impl PrettyTree for AssignmentPack
impl PrettyTree for AssignmentPackComponent
impl PrettyTree for BinaryExpr
impl PrettyTree for BinaryOperator
impl PrettyTree for BreakExpr
impl PrettyTree for Catch
impl PrettyTree for Cell
impl PrettyTree for Collection
impl PrettyTree for CommentTrivia
impl PrettyTree for Component
impl PrettyTree for ContinueExpr
impl PrettyTree for ControlFlow
impl PrettyTree for DebugExpr
impl PrettyTree for DebugKeyword
impl PrettyTree for DoStep
impl PrettyTree for EOC
impl PrettyTree for EOF
impl PrettyTree for ElseClause
impl PrettyTree for Empty
impl PrettyTree for EscapeSequence
impl PrettyTree for EvaluatedAssignment
impl PrettyTree for ExceptDo
impl PrettyTree for Expr
impl PrettyTree for ExprPack
impl PrettyTree for FixedArity
impl PrettyTree for FloatLiteral
impl PrettyTree for ForLoop
impl PrettyTree for FromInstance
impl PrettyTree for GlobalBinding
impl PrettyTree for GlobalParallelAssignment
impl PrettyTree for Holder
impl PrettyTree for IfStatement
impl PrettyTree for Installation
impl PrettyTree for IntegerLiteral
impl PrettyTree for IterIn
impl PrettyTree for IterRange
impl PrettyTree for IterationDomain
impl PrettyTree for LambdaExpression
impl PrettyTree for LambdaParameters
impl PrettyTree for List
impl PrettyTree for ListStep
impl PrettyTree for Literal
impl PrettyTree for LocalBinding
impl PrettyTree for LocalParallelAssignment
impl PrettyTree for LoopBody
impl PrettyTree for MethodInstallation
impl PrettyTree for NewInstallation
impl PrettyTree for NewStatement
impl PrettyTree for OfClass
impl PrettyTree for OperatorAssignment
impl PrettyTree for OperatorExpr
impl PrettyTree for OperatorInstallation
impl PrettyTree for OptionExpression
impl PrettyTree for ParallelAssignment
impl PrettyTree for PostfixExpr
impl PrettyTree for PostfixOperator
impl PrettyTree for PrefixExpr
impl PrettyTree for PrefixOperator
impl PrettyTree for ProfilingExpr
impl PrettyTree for ProfilingModifier
impl PrettyTree for QuoteExpression
impl PrettyTree for QuoteSpecifier
impl PrettyTree for RangeBoundFrom
impl PrettyTree for RangeBoundTo
impl PrettyTree for RawStringContent
impl PrettyTree for RawStringElement
impl PrettyTree for RawStringLiteral
impl PrettyTree for ReturnExpr
impl PrettyTree for Sequence
impl PrettyTree for SimpleBinding
impl PrettyTree for SourceFile
impl PrettyTree for Statement
impl PrettyTree for StringContent
impl PrettyTree for StringElement
impl PrettyTree for StringLiteral
impl PrettyTree for Symbol
impl PrettyTree for ThenClause
impl PrettyTree for Throw
impl PrettyTree for Trap
impl PrettyTree for Trivia
impl PrettyTree for TryFallback
impl PrettyTree for TryStatement
impl PrettyTree for TypeAnnotation
impl PrettyTree for Variadic
impl PrettyTree for WhenCondition
impl PrettyTree for WhileLoop
impl PrettyTree for _Add
impl PrettyTree for _AddAdd
impl PrettyTree for _AddAddEql
impl PrettyTree for _AddEql
impl PrettyTree for _Amp
impl PrettyTree for _AmpEql
impl PrettyTree for _And
impl PrettyTree for _Att
impl PrettyTree for _AttAtt
impl PrettyTree for _AttAttEql
impl PrettyTree for _AttAttQsm
impl PrettyTree for _AttAttQsmEql
impl PrettyTree for _AttEql
impl PrettyTree for _Bng
impl PrettyTree for _BngEql
impl PrettyTree for _Box
impl PrettyTree for _BoxEql
impl PrettyTree for _Break
impl PrettyTree for _Breakpoint
impl PrettyTree for _Bsl
impl PrettyTree for _BslBsl
impl PrettyTree for _BslBslEql
impl PrettyTree for _BslEql
impl PrettyTree for _Catch
impl PrettyTree for _Cdt
impl PrettyTree for _CdtEql
impl PrettyTree for _Cma
impl PrettyTree for _Col
impl PrettyTree for _ColEql
impl PrettyTree for _Continue
impl PrettyTree for _Crt
impl PrettyTree for _CrtBng
impl PrettyTree for _CrtCrt
impl PrettyTree for _CrtCrtEql
impl PrettyTree for _CrtEql
impl PrettyTree for _CrtGst
impl PrettyTree for _CrtGstEql
impl PrettyTree for _CrtLst
impl PrettyTree for _CrtLstEql
impl PrettyTree for _CrtMul
impl PrettyTree for _CrtMulMul
impl PrettyTree for _CrtMulMulEql
impl PrettyTree for _CrtTld
impl PrettyTree for _Do
impl PrettyTree for _Dot
impl PrettyTree for _DotDot
impl PrettyTree for _DotDotEql
impl PrettyTree for _DotDotLst
impl PrettyTree for _DotDotLstEql
impl PrettyTree for _DotQsm
impl PrettyTree for _ElapsedTime
impl PrettyTree for _ElapsedTiming
impl PrettyTree for _Else
impl PrettyTree for _Eql
impl PrettyTree for _EqlBngEql
impl PrettyTree for _EqlEql
impl PrettyTree for _EqlEqlEql
impl PrettyTree for _EqlEqlEqlGst
impl PrettyTree for _EqlEqlEqlGstEql
impl PrettyTree for _EqlEqlGst
impl PrettyTree for _EqlEqlGstEql
impl PrettyTree for _EqlGst
impl PrettyTree for _Except
impl PrettyTree for _Finish
impl PrettyTree for _For
impl PrettyTree for _From
impl PrettyTree for _Global
impl PrettyTree for _Graded
impl PrettyTree for _Gst
impl PrettyTree for _GstEql
impl PrettyTree for _GstGst
impl PrettyTree for _GstGstEql
impl PrettyTree for _Hsh
impl PrettyTree for _HshQsm
impl PrettyTree for _If
impl PrettyTree for _In
impl PrettyTree for _List
impl PrettyTree for _Local
impl PrettyTree for _Lst
impl PrettyTree for _LstEql
impl PrettyTree for _LstEqlEql
impl PrettyTree for _LstEqlEqlEql
impl PrettyTree for _LstEqlEqlGst
impl PrettyTree for _LstEqlEqlGstEql
impl PrettyTree for _LstLst
impl PrettyTree for _LstLstEql
impl PrettyTree for _LstSub
impl PrettyTree for _Mod
impl PrettyTree for _ModEql
impl PrettyTree for _Mul
impl PrettyTree for _MulEql
impl PrettyTree for _MulMul
impl PrettyTree for _MulMulEql
impl PrettyTree for _New
impl PrettyTree for _Not
impl PrettyTree for _Of
impl PrettyTree for _Or
impl PrettyTree for _Pip
impl PrettyTree for _PipEql
impl PrettyTree for _PipPip
impl PrettyTree for _PipPipEql
impl PrettyTree for _PipSub
impl PrettyTree for _PipSubEql
impl PrettyTree for _PipUbs
impl PrettyTree for _PipUbsEql
impl PrettyTree for _Profile
impl PrettyTree for _Qsm
impl PrettyTree for _QsmQsm
impl PrettyTree for _QsmQsmEql
impl PrettyTree for _Return
impl PrettyTree for _Scl
impl PrettyTree for _Sfp
impl PrettyTree for _SfpEql
impl PrettyTree for _Shield
impl PrettyTree for _Slh
impl PrettyTree for _SlhEql
impl PrettyTree for _SlhSlh
impl PrettyTree for _SlhSlhEql
impl PrettyTree for _Step
impl PrettyTree for _Sub
impl PrettyTree for _SubEql
impl PrettyTree for _SubGst
impl PrettyTree for _Symbol
impl PrettyTree for _Test
impl PrettyTree for _Then
impl PrettyTree for _ThreadLocal
impl PrettyTree for _ThreadVariable
impl PrettyTree for _Throw
impl PrettyTree for _Time
impl PrettyTree for _Timing
impl PrettyTree for _Tld
impl PrettyTree for _TldEql
impl PrettyTree for _To
impl PrettyTree for _Trap
impl PrettyTree for _Try
impl PrettyTree for _Ubs
impl PrettyTree for _UbsBng
impl PrettyTree for _UbsEql
impl PrettyTree for _UbsGst
impl PrettyTree for _UbsGstEql
impl PrettyTree for _UbsLst
impl PrettyTree for _UbsLstEql
impl PrettyTree for _UbsMul
impl PrettyTree for _UbsTld
impl PrettyTree for _When
impl PrettyTree for _While
impl PrettyTree for _Xor
impl<S, D> PrettyTree for Delimited<S, D>
Available on crate feature
pretty only.