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. Semantic category enums remain visible
because they define visitor dispatch, while generic containers are
transparent 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 AngleBarList
impl PrettyTree for ArgumentListContent
impl PrettyTree for ArgumentListContentPack
impl PrettyTree for Array
impl PrettyTree for AssignmentArgument
impl PrettyTree for AssignmentList
impl PrettyTree for AssignmentListContent
impl PrettyTree for AssignmentListContentPack
impl PrettyTree for AugmentedOperator
impl PrettyTree for BinaryOperator
impl PrettyTree for Cell
impl PrettyTree for CommentTrivia
impl PrettyTree for Component
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 Expr
impl PrettyTree for ExprAssign
impl PrettyTree for ExprAssignAugmented
impl PrettyTree for ExprAssignEvaluated
impl PrettyTree for ExprAssignInstall
impl PrettyTree for ExprAssignInstallMethod
impl PrettyTree for ExprAssignInstallNew
impl PrettyTree for ExprAssignInstallOp
impl PrettyTree for ExprAssignOp
impl PrettyTree for ExprAssignParallel
impl PrettyTree for ExprAssignParallelGlobal
impl PrettyTree for ExprAssignParallelLocal
impl PrettyTree for ExprAssignSimple
impl PrettyTree for ExprAssignSimpleGlobal
impl PrettyTree for ExprAssignSimpleLocal
impl PrettyTree for ExprCatch
impl PrettyTree for ExprCollection
impl PrettyTree for ExprControl
impl PrettyTree for ExprControlBreak
impl PrettyTree for ExprControlContinue
impl PrettyTree for ExprControlReturn
impl PrettyTree for ExprDebug
impl PrettyTree for ExprDebugBreakpoint
impl PrettyTree for ExprDebugFinish
impl PrettyTree for ExprDebugShield
impl PrettyTree for ExprDebugStep
impl PrettyTree for ExprDebugTest
impl PrettyTree for ExprFor
impl PrettyTree for ExprForBare
impl PrettyTree for ExprForIn
impl PrettyTree for ExprForRange
impl PrettyTree for ExprIf
impl PrettyTree for ExprLambda
impl PrettyTree for ExprLambdaList
impl PrettyTree for ExprLambdaVariadic
impl PrettyTree for ExprLiteral
impl PrettyTree for ExprNew
impl PrettyTree for ExprOp
impl PrettyTree for ExprOpBin
impl PrettyTree for ExprOpBinAdj
impl PrettyTree for ExprOpBinIndex
impl PrettyTree for ExprOpBinMember
impl PrettyTree for ExprOpBinMemberDot
impl PrettyTree for ExprOpBinMemberOptional
impl PrettyTree for ExprOpBinRegular
impl PrettyTree for ExprOpPostfix
impl PrettyTree for ExprOpPrefix
impl PrettyTree for ExprOption
impl PrettyTree for ExprPack
impl PrettyTree for ExprProfile
impl PrettyTree for ExprProfileElapsedTime
impl PrettyTree for ExprProfileElapsedTiming
impl PrettyTree for ExprProfileProfile
impl PrettyTree for ExprProfileTime
impl PrettyTree for ExprProfileTiming
impl PrettyTree for ExprQuote
impl PrettyTree for ExprQuoteGlobal
impl PrettyTree for ExprQuoteLocal
impl PrettyTree for ExprQuoteSymbol
impl PrettyTree for ExprQuoteThreadLocal
impl PrettyTree for ExprQuoteThreadVariable
impl PrettyTree for ExprThrow
impl PrettyTree for ExprTrap
impl PrettyTree for ExprTry
impl PrettyTree for ExprWhile
impl PrettyTree for FloatLiteral
impl PrettyTree for FromInstance
impl PrettyTree for Holder
impl PrettyTree for IntegerLiteral
impl PrettyTree for List
impl PrettyTree for ListStep
impl PrettyTree for LoopBody
impl PrettyTree for OfClass
impl PrettyTree for PackedContent
impl PrettyTree for PostfixOperator
impl PrettyTree for PrefixOperator
impl PrettyTree for RangeBoundFrom
impl PrettyTree for RangeBoundTo
impl PrettyTree for RawStringContent
impl PrettyTree for RawStringElement
impl PrettyTree for RawStringLiteral
impl PrettyTree for Sequence
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 Trivia
impl PrettyTree for TryFallback
impl PrettyTree for TryFallbackExcept
impl PrettyTree for TypeAnnotation
impl PrettyTree for WhenCondition
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.