#[repr(C)]pub enum NodeKind {
Show 218 variants
Program = 0,
ConstantAccess = 1,
Access = 2,
ClassConstantAccess = 3,
NullSafePropertyAccess = 4,
PropertyAccess = 5,
StaticPropertyAccess = 6,
Argument = 7,
ArgumentList = 8,
NamedArgument = 9,
PositionalArgument = 10,
Array = 11,
ArrayAccess = 12,
ArrayAppend = 13,
ArrayElement = 14,
KeyValueArrayElement = 15,
LegacyArray = 16,
List = 17,
MissingArrayElement = 18,
ValueArrayElement = 19,
VariadicArrayElement = 20,
Attribute = 21,
AttributeList = 22,
Block = 23,
Call = 24,
FunctionCall = 25,
MethodCall = 26,
NullSafeMethodCall = 27,
StaticMethodCall = 28,
ClassLikeConstant = 29,
ClassLikeConstantItem = 30,
EnumCase = 31,
EnumCaseBackedItem = 32,
EnumCaseItem = 33,
EnumCaseUnitItem = 34,
Extends = 35,
Implements = 36,
ClassLikeConstantSelector = 37,
ClassLikeMember = 38,
ClassLikeMemberExpressionSelector = 39,
ClassLikeMemberSelector = 40,
Method = 41,
MethodAbstractBody = 42,
MethodBody = 43,
HookedProperty = 44,
PlainProperty = 45,
Property = 46,
PropertyAbstractItem = 47,
PropertyConcreteItem = 48,
PropertyHook = 49,
PropertyHookAbstractBody = 50,
PropertyHookBody = 51,
PropertyHookConcreteBody = 52,
PropertyHookConcreteExpressionBody = 53,
PropertyHookList = 54,
PropertyItem = 55,
TraitUse = 56,
TraitUseAbsoluteMethodReference = 57,
TraitUseAbstractSpecification = 58,
TraitUseAdaptation = 59,
TraitUseAliasAdaptation = 60,
TraitUseConcreteSpecification = 61,
TraitUseMethodReference = 62,
TraitUsePrecedenceAdaptation = 63,
TraitUseSpecification = 64,
AnonymousClass = 65,
Class = 66,
Enum = 67,
EnumBackingTypeHint = 68,
Interface = 69,
Trait = 70,
Clone = 71,
ClosureCreation = 72,
FunctionClosureCreation = 73,
MethodClosureCreation = 74,
StaticMethodClosureCreation = 75,
Constant = 76,
ConstantItem = 77,
Construct = 78,
DieConstruct = 79,
EmptyConstruct = 80,
EvalConstruct = 81,
ExitConstruct = 82,
IncludeConstruct = 83,
IncludeOnceConstruct = 84,
IssetConstruct = 85,
PrintConstruct = 86,
RequireConstruct = 87,
RequireOnceConstruct = 88,
If = 89,
IfBody = 90,
IfColonDelimitedBody = 91,
IfColonDelimitedBodyElseClause = 92,
IfColonDelimitedBodyElseIfClause = 93,
IfStatementBody = 94,
IfStatementBodyElseClause = 95,
IfStatementBodyElseIfClause = 96,
Match = 97,
MatchArm = 98,
MatchDefaultArm = 99,
MatchExpressionArm = 100,
Switch = 101,
SwitchBody = 102,
SwitchBraceDelimitedBody = 103,
SwitchCase = 104,
SwitchCaseSeparator = 105,
SwitchColonDelimitedBody = 106,
SwitchDefaultCase = 107,
SwitchExpressionCase = 108,
Declare = 109,
DeclareBody = 110,
DeclareColonDelimitedBody = 111,
DeclareItem = 112,
Echo = 113,
Expression = 114,
Binary = 115,
BinaryOperator = 116,
UnaryPrefix = 117,
UnaryPrefixOperator = 118,
UnaryPostfix = 119,
UnaryPostfixOperator = 120,
Parenthesized = 121,
ArrowFunction = 122,
Closure = 123,
ClosureUseClause = 124,
ClosureUseClauseVariable = 125,
Function = 126,
FunctionLikeParameter = 127,
FunctionLikeParameterDefaultValue = 128,
FunctionLikeParameterList = 129,
FunctionLikeReturnTypeHint = 130,
Global = 131,
Goto = 132,
Label = 133,
HaltCompiler = 134,
FullyQualifiedIdentifier = 135,
Identifier = 136,
LocalIdentifier = 137,
QualifiedIdentifier = 138,
Inline = 139,
Instantiation = 140,
Keyword = 141,
Literal = 142,
Pipe = 143,
LiteralFloat = 144,
LiteralInteger = 145,
LiteralString = 146,
MagicConstant = 147,
Modifier = 148,
Namespace = 149,
NamespaceBody = 150,
NamespaceImplicitBody = 151,
Assignment = 152,
AssignmentOperator = 153,
Conditional = 154,
DoWhile = 155,
Foreach = 156,
ForeachBody = 157,
ForeachColonDelimitedBody = 158,
ForeachKeyValueTarget = 159,
ForeachTarget = 160,
ForeachValueTarget = 161,
For = 162,
ForBody = 163,
ForColonDelimitedBody = 164,
While = 165,
WhileBody = 166,
WhileColonDelimitedBody = 167,
Break = 168,
Continue = 169,
Return = 170,
Static = 171,
StaticAbstractItem = 172,
StaticConcreteItem = 173,
StaticItem = 174,
Try = 175,
TryCatchClause = 176,
TryFinallyClause = 177,
MaybeTypedUseItem = 178,
MixedUseItemList = 179,
TypedUseItemList = 180,
TypedUseItemSequence = 181,
Use = 182,
UseItem = 183,
UseItemAlias = 184,
UseItemSequence = 185,
UseItems = 186,
UseType = 187,
Yield = 188,
YieldFrom = 189,
YieldPair = 190,
YieldValue = 191,
Statement = 192,
ExpressionStatement = 193,
BracedExpressionStringPart = 194,
DocumentString = 195,
InterpolatedString = 196,
LiteralStringPart = 197,
ShellExecuteString = 198,
CompositeString = 199,
StringPart = 200,
ClosingTag = 201,
EchoOpeningTag = 202,
FullOpeningTag = 203,
OpeningTag = 204,
ShortOpeningTag = 205,
Terminator = 206,
Throw = 207,
Hint = 208,
IntersectionHint = 209,
NullableHint = 210,
ParenthesizedHint = 211,
UnionHint = 212,
Unset = 213,
DirectVariable = 214,
IndirectVariable = 215,
NestedVariable = 216,
Variable = 217,
}Variants§
Program = 0
ConstantAccess = 1
Access = 2
ClassConstantAccess = 3
NullSafePropertyAccess = 4
PropertyAccess = 5
StaticPropertyAccess = 6
Argument = 7
ArgumentList = 8
NamedArgument = 9
PositionalArgument = 10
Array = 11
ArrayAccess = 12
ArrayAppend = 13
ArrayElement = 14
KeyValueArrayElement = 15
LegacyArray = 16
List = 17
MissingArrayElement = 18
ValueArrayElement = 19
VariadicArrayElement = 20
Attribute = 21
AttributeList = 22
Block = 23
Call = 24
FunctionCall = 25
MethodCall = 26
NullSafeMethodCall = 27
StaticMethodCall = 28
ClassLikeConstant = 29
ClassLikeConstantItem = 30
EnumCase = 31
EnumCaseBackedItem = 32
EnumCaseItem = 33
EnumCaseUnitItem = 34
Extends = 35
Implements = 36
ClassLikeConstantSelector = 37
ClassLikeMember = 38
ClassLikeMemberExpressionSelector = 39
ClassLikeMemberSelector = 40
Method = 41
MethodAbstractBody = 42
MethodBody = 43
HookedProperty = 44
PlainProperty = 45
Property = 46
PropertyAbstractItem = 47
PropertyConcreteItem = 48
PropertyHook = 49
PropertyHookAbstractBody = 50
PropertyHookBody = 51
PropertyHookConcreteBody = 52
PropertyHookConcreteExpressionBody = 53
PropertyHookList = 54
PropertyItem = 55
TraitUse = 56
TraitUseAbsoluteMethodReference = 57
TraitUseAbstractSpecification = 58
TraitUseAdaptation = 59
TraitUseAliasAdaptation = 60
TraitUseConcreteSpecification = 61
TraitUseMethodReference = 62
TraitUsePrecedenceAdaptation = 63
TraitUseSpecification = 64
AnonymousClass = 65
Class = 66
Enum = 67
EnumBackingTypeHint = 68
Interface = 69
Trait = 70
Clone = 71
ClosureCreation = 72
FunctionClosureCreation = 73
MethodClosureCreation = 74
StaticMethodClosureCreation = 75
Constant = 76
ConstantItem = 77
Construct = 78
DieConstruct = 79
EmptyConstruct = 80
EvalConstruct = 81
ExitConstruct = 82
IncludeConstruct = 83
IncludeOnceConstruct = 84
IssetConstruct = 85
PrintConstruct = 86
RequireConstruct = 87
RequireOnceConstruct = 88
If = 89
IfBody = 90
IfColonDelimitedBody = 91
IfColonDelimitedBodyElseClause = 92
IfColonDelimitedBodyElseIfClause = 93
IfStatementBody = 94
IfStatementBodyElseClause = 95
IfStatementBodyElseIfClause = 96
Match = 97
MatchArm = 98
MatchDefaultArm = 99
MatchExpressionArm = 100
Switch = 101
SwitchBody = 102
SwitchBraceDelimitedBody = 103
SwitchCase = 104
SwitchCaseSeparator = 105
SwitchColonDelimitedBody = 106
SwitchDefaultCase = 107
SwitchExpressionCase = 108
Declare = 109
DeclareBody = 110
DeclareColonDelimitedBody = 111
DeclareItem = 112
Echo = 113
Expression = 114
Binary = 115
BinaryOperator = 116
UnaryPrefix = 117
UnaryPrefixOperator = 118
UnaryPostfix = 119
UnaryPostfixOperator = 120
Parenthesized = 121
ArrowFunction = 122
Closure = 123
ClosureUseClause = 124
ClosureUseClauseVariable = 125
Function = 126
FunctionLikeParameter = 127
FunctionLikeParameterDefaultValue = 128
FunctionLikeParameterList = 129
FunctionLikeReturnTypeHint = 130
Global = 131
Goto = 132
Label = 133
HaltCompiler = 134
FullyQualifiedIdentifier = 135
Identifier = 136
LocalIdentifier = 137
QualifiedIdentifier = 138
Inline = 139
Instantiation = 140
Keyword = 141
Literal = 142
Pipe = 143
LiteralFloat = 144
LiteralInteger = 145
LiteralString = 146
MagicConstant = 147
Modifier = 148
Namespace = 149
NamespaceBody = 150
NamespaceImplicitBody = 151
Assignment = 152
AssignmentOperator = 153
Conditional = 154
DoWhile = 155
Foreach = 156
ForeachBody = 157
ForeachColonDelimitedBody = 158
ForeachKeyValueTarget = 159
ForeachTarget = 160
ForeachValueTarget = 161
For = 162
ForBody = 163
ForColonDelimitedBody = 164
While = 165
WhileBody = 166
WhileColonDelimitedBody = 167
Break = 168
Continue = 169
Return = 170
Static = 171
StaticAbstractItem = 172
StaticConcreteItem = 173
StaticItem = 174
Try = 175
TryCatchClause = 176
TryFinallyClause = 177
MaybeTypedUseItem = 178
MixedUseItemList = 179
TypedUseItemList = 180
TypedUseItemSequence = 181
Use = 182
UseItem = 183
UseItemAlias = 184
UseItemSequence = 185
UseItems = 186
UseType = 187
Yield = 188
YieldFrom = 189
YieldPair = 190
YieldValue = 191
Statement = 192
ExpressionStatement = 193
BracedExpressionStringPart = 194
DocumentString = 195
InterpolatedString = 196
LiteralStringPart = 197
ShellExecuteString = 198
CompositeString = 199
StringPart = 200
ClosingTag = 201
EchoOpeningTag = 202
FullOpeningTag = 203
OpeningTag = 204
ShortOpeningTag = 205
Terminator = 206
Throw = 207
Hint = 208
IntersectionHint = 209
NullableHint = 210
ParenthesizedHint = 211
UnionHint = 212
Unset = 213
DirectVariable = 214
IndirectVariable = 215
NestedVariable = 216
Variable = 217
Trait Implementations§
Source§impl<'de> Deserialize<'de> for NodeKind
impl<'de> Deserialize<'de> for NodeKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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);