#[non_exhaustive]#[repr(u8)]pub enum NodeKind {
Show 223 variants
Program = 0,
ConstantAccess = 1,
Access = 2,
ClassConstantAccess = 3,
NullSafePropertyAccess = 4,
PropertyAccess = 5,
StaticPropertyAccess = 6,
Argument = 7,
ArgumentList = 8,
PartialArgument = 9,
PartialArgumentList = 10,
NamedArgument = 11,
NamedPlaceholderArgument = 12,
PlaceholderArgument = 13,
PositionalArgument = 14,
VariadicPlaceholderArgument = 15,
Array = 16,
ArrayAccess = 17,
ArrayAppend = 18,
ArrayElement = 19,
KeyValueArrayElement = 20,
LegacyArray = 21,
List = 22,
MissingArrayElement = 23,
ValueArrayElement = 24,
VariadicArrayElement = 25,
Attribute = 26,
AttributeList = 27,
Block = 28,
Call = 29,
FunctionCall = 30,
MethodCall = 31,
NullSafeMethodCall = 32,
StaticMethodCall = 33,
PartialApplication = 34,
FunctionPartialApplication = 35,
MethodPartialApplication = 36,
StaticMethodPartialApplication = 37,
ClassLikeConstant = 38,
ClassLikeConstantItem = 39,
EnumCase = 40,
EnumCaseBackedItem = 41,
EnumCaseItem = 42,
EnumCaseUnitItem = 43,
Extends = 44,
Implements = 45,
ClassLikeConstantSelector = 46,
ClassLikeMember = 47,
ClassLikeMemberExpressionSelector = 48,
ClassLikeMemberSelector = 49,
Method = 50,
MethodAbstractBody = 51,
MethodBody = 52,
HookedProperty = 53,
PlainProperty = 54,
Property = 55,
PropertyAbstractItem = 56,
PropertyConcreteItem = 57,
PropertyHook = 58,
PropertyHookAbstractBody = 59,
PropertyHookBody = 60,
PropertyHookConcreteBody = 61,
PropertyHookConcreteExpressionBody = 62,
PropertyHookList = 63,
PropertyItem = 64,
TraitUse = 65,
TraitUseAbsoluteMethodReference = 66,
TraitUseAbstractSpecification = 67,
TraitUseAdaptation = 68,
TraitUseAliasAdaptation = 69,
TraitUseConcreteSpecification = 70,
TraitUseMethodReference = 71,
TraitUsePrecedenceAdaptation = 72,
TraitUseSpecification = 73,
AnonymousClass = 74,
Class = 75,
Enum = 76,
EnumBackingTypeHint = 77,
Interface = 78,
Trait = 79,
Clone = 80,
Constant = 81,
ConstantItem = 82,
Construct = 83,
DieConstruct = 84,
EmptyConstruct = 85,
EvalConstruct = 86,
ExitConstruct = 87,
IncludeConstruct = 88,
IncludeOnceConstruct = 89,
IssetConstruct = 90,
PrintConstruct = 91,
RequireConstruct = 92,
RequireOnceConstruct = 93,
If = 94,
IfBody = 95,
IfColonDelimitedBody = 96,
IfColonDelimitedBodyElseClause = 97,
IfColonDelimitedBodyElseIfClause = 98,
IfStatementBody = 99,
IfStatementBodyElseClause = 100,
IfStatementBodyElseIfClause = 101,
Match = 102,
MatchArm = 103,
MatchDefaultArm = 104,
MatchExpressionArm = 105,
Switch = 106,
SwitchBody = 107,
SwitchBraceDelimitedBody = 108,
SwitchCase = 109,
SwitchCaseSeparator = 110,
SwitchColonDelimitedBody = 111,
SwitchDefaultCase = 112,
SwitchExpressionCase = 113,
Declare = 114,
DeclareBody = 115,
DeclareColonDelimitedBody = 116,
DeclareItem = 117,
EchoTag = 118,
Echo = 119,
Expression = 120,
Binary = 121,
BinaryOperator = 122,
UnaryPrefix = 123,
UnaryPrefixOperator = 124,
UnaryPostfix = 125,
UnaryPostfixOperator = 126,
Parenthesized = 127,
ArrowFunction = 128,
Closure = 129,
ClosureUseClause = 130,
ClosureUseClauseVariable = 131,
Function = 132,
FunctionLikeParameter = 133,
FunctionLikeParameterDefaultValue = 134,
FunctionLikeParameterList = 135,
FunctionLikeReturnTypeHint = 136,
Global = 137,
Goto = 138,
Label = 139,
HaltCompiler = 140,
FullyQualifiedIdentifier = 141,
Identifier = 142,
LocalIdentifier = 143,
QualifiedIdentifier = 144,
Inline = 145,
Instantiation = 146,
Keyword = 147,
Literal = 148,
Pipe = 149,
LiteralFloat = 150,
LiteralInteger = 151,
LiteralString = 152,
MagicConstant = 153,
Modifier = 154,
Namespace = 155,
NamespaceBody = 156,
NamespaceImplicitBody = 157,
Assignment = 158,
AssignmentOperator = 159,
Conditional = 160,
DoWhile = 161,
Foreach = 162,
ForeachBody = 163,
ForeachColonDelimitedBody = 164,
ForeachKeyValueTarget = 165,
ForeachTarget = 166,
ForeachValueTarget = 167,
For = 168,
ForBody = 169,
ForColonDelimitedBody = 170,
While = 171,
WhileBody = 172,
WhileColonDelimitedBody = 173,
Break = 174,
Continue = 175,
Return = 176,
Static = 177,
StaticAbstractItem = 178,
StaticConcreteItem = 179,
StaticItem = 180,
Try = 181,
TryCatchClause = 182,
TryFinallyClause = 183,
MaybeTypedUseItem = 184,
MixedUseItemList = 185,
TypedUseItemList = 186,
TypedUseItemSequence = 187,
Use = 188,
UseItem = 189,
UseItemAlias = 190,
UseItemSequence = 191,
UseItems = 192,
UseType = 193,
Yield = 194,
YieldFrom = 195,
YieldPair = 196,
YieldValue = 197,
Statement = 198,
ExpressionStatement = 199,
BracedExpressionStringPart = 200,
DocumentString = 201,
InterpolatedString = 202,
LiteralStringPart = 203,
ShellExecuteString = 204,
CompositeString = 205,
StringPart = 206,
ClosingTag = 207,
FullOpeningTag = 208,
OpeningTag = 209,
ShortOpeningTag = 210,
Terminator = 211,
Throw = 212,
Hint = 213,
IntersectionHint = 214,
NullableHint = 215,
ParenthesizedHint = 216,
UnionHint = 217,
Unset = 218,
DirectVariable = 219,
IndirectVariable = 220,
NestedVariable = 221,
Variable = 222,
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Program = 0
ConstantAccess = 1
Access = 2
ClassConstantAccess = 3
NullSafePropertyAccess = 4
PropertyAccess = 5
StaticPropertyAccess = 6
Argument = 7
ArgumentList = 8
PartialArgument = 9
PartialArgumentList = 10
NamedArgument = 11
NamedPlaceholderArgument = 12
PlaceholderArgument = 13
PositionalArgument = 14
VariadicPlaceholderArgument = 15
Array = 16
ArrayAccess = 17
ArrayAppend = 18
ArrayElement = 19
KeyValueArrayElement = 20
LegacyArray = 21
List = 22
MissingArrayElement = 23
ValueArrayElement = 24
VariadicArrayElement = 25
Attribute = 26
AttributeList = 27
Block = 28
Call = 29
FunctionCall = 30
MethodCall = 31
NullSafeMethodCall = 32
StaticMethodCall = 33
PartialApplication = 34
FunctionPartialApplication = 35
MethodPartialApplication = 36
StaticMethodPartialApplication = 37
ClassLikeConstant = 38
ClassLikeConstantItem = 39
EnumCase = 40
EnumCaseBackedItem = 41
EnumCaseItem = 42
EnumCaseUnitItem = 43
Extends = 44
Implements = 45
ClassLikeConstantSelector = 46
ClassLikeMember = 47
ClassLikeMemberExpressionSelector = 48
ClassLikeMemberSelector = 49
Method = 50
MethodAbstractBody = 51
MethodBody = 52
HookedProperty = 53
PlainProperty = 54
Property = 55
PropertyAbstractItem = 56
PropertyConcreteItem = 57
PropertyHook = 58
PropertyHookAbstractBody = 59
PropertyHookBody = 60
PropertyHookConcreteBody = 61
PropertyHookConcreteExpressionBody = 62
PropertyHookList = 63
PropertyItem = 64
TraitUse = 65
TraitUseAbsoluteMethodReference = 66
TraitUseAbstractSpecification = 67
TraitUseAdaptation = 68
TraitUseAliasAdaptation = 69
TraitUseConcreteSpecification = 70
TraitUseMethodReference = 71
TraitUsePrecedenceAdaptation = 72
TraitUseSpecification = 73
AnonymousClass = 74
Class = 75
Enum = 76
EnumBackingTypeHint = 77
Interface = 78
Trait = 79
Clone = 80
Constant = 81
ConstantItem = 82
Construct = 83
DieConstruct = 84
EmptyConstruct = 85
EvalConstruct = 86
ExitConstruct = 87
IncludeConstruct = 88
IncludeOnceConstruct = 89
IssetConstruct = 90
PrintConstruct = 91
RequireConstruct = 92
RequireOnceConstruct = 93
If = 94
IfBody = 95
IfColonDelimitedBody = 96
IfColonDelimitedBodyElseClause = 97
IfColonDelimitedBodyElseIfClause = 98
IfStatementBody = 99
IfStatementBodyElseClause = 100
IfStatementBodyElseIfClause = 101
Match = 102
MatchArm = 103
MatchDefaultArm = 104
MatchExpressionArm = 105
Switch = 106
SwitchBody = 107
SwitchBraceDelimitedBody = 108
SwitchCase = 109
SwitchCaseSeparator = 110
SwitchColonDelimitedBody = 111
SwitchDefaultCase = 112
SwitchExpressionCase = 113
Declare = 114
DeclareBody = 115
DeclareColonDelimitedBody = 116
DeclareItem = 117
EchoTag = 118
Echo = 119
Expression = 120
Binary = 121
BinaryOperator = 122
UnaryPrefix = 123
UnaryPrefixOperator = 124
UnaryPostfix = 125
UnaryPostfixOperator = 126
Parenthesized = 127
ArrowFunction = 128
Closure = 129
ClosureUseClause = 130
ClosureUseClauseVariable = 131
Function = 132
FunctionLikeParameter = 133
FunctionLikeParameterDefaultValue = 134
FunctionLikeParameterList = 135
FunctionLikeReturnTypeHint = 136
Global = 137
Goto = 138
Label = 139
HaltCompiler = 140
FullyQualifiedIdentifier = 141
Identifier = 142
LocalIdentifier = 143
QualifiedIdentifier = 144
Inline = 145
Instantiation = 146
Keyword = 147
Literal = 148
Pipe = 149
LiteralFloat = 150
LiteralInteger = 151
LiteralString = 152
MagicConstant = 153
Modifier = 154
Namespace = 155
NamespaceBody = 156
NamespaceImplicitBody = 157
Assignment = 158
AssignmentOperator = 159
Conditional = 160
DoWhile = 161
Foreach = 162
ForeachBody = 163
ForeachColonDelimitedBody = 164
ForeachKeyValueTarget = 165
ForeachTarget = 166
ForeachValueTarget = 167
For = 168
ForBody = 169
ForColonDelimitedBody = 170
While = 171
WhileBody = 172
WhileColonDelimitedBody = 173
Break = 174
Continue = 175
Return = 176
Static = 177
StaticAbstractItem = 178
StaticConcreteItem = 179
StaticItem = 180
Try = 181
TryCatchClause = 182
TryFinallyClause = 183
MaybeTypedUseItem = 184
MixedUseItemList = 185
TypedUseItemList = 186
TypedUseItemSequence = 187
Use = 188
UseItem = 189
UseItemAlias = 190
UseItemSequence = 191
UseItems = 192
UseType = 193
Yield = 194
YieldFrom = 195
YieldPair = 196
YieldValue = 197
Statement = 198
ExpressionStatement = 199
BracedExpressionStringPart = 200
DocumentString = 201
InterpolatedString = 202
LiteralStringPart = 203
ShellExecuteString = 204
CompositeString = 205
StringPart = 206
ClosingTag = 207
FullOpeningTag = 208
OpeningTag = 209
ShortOpeningTag = 210
Terminator = 211
Throw = 212
Hint = 213
IntersectionHint = 214
NullableHint = 215
ParenthesizedHint = 216
UnionHint = 217
Unset = 218
DirectVariable = 219
IndirectVariable = 220
NestedVariable = 221
Variable = 222
Trait Implementations§
Source§impl Ord for NodeKind
impl Ord for NodeKind
Source§impl PartialOrd for NodeKind
impl PartialOrd for NodeKind
impl Copy for NodeKind
impl Eq for NodeKind
impl StructuralPartialEq for NodeKind
Auto Trait Implementations§
impl Freeze for NodeKind
impl RefUnwindSafe for NodeKind
impl Send for NodeKind
impl Sync for NodeKind
impl Unpin for NodeKind
impl UnwindSafe for NodeKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);