#[repr(C, u8)]pub enum AstKind<'a> {
Show 188 variants
Program(&'a Program<'a>),
IdentifierName(&'a IdentifierName<'a>),
IdentifierReference(&'a IdentifierReference<'a>),
BindingIdentifier(&'a BindingIdentifier<'a>),
LabelIdentifier(&'a LabelIdentifier<'a>),
ThisExpression(&'a ThisExpression),
ArrayExpression(&'a ArrayExpression<'a>),
Elision(&'a Elision),
ObjectExpression(&'a ObjectExpression<'a>),
ObjectProperty(&'a ObjectProperty<'a>),
TemplateLiteral(&'a TemplateLiteral<'a>),
TaggedTemplateExpression(&'a TaggedTemplateExpression<'a>),
TemplateElement(&'a TemplateElement<'a>),
ComputedMemberExpression(&'a ComputedMemberExpression<'a>),
StaticMemberExpression(&'a StaticMemberExpression<'a>),
PrivateFieldExpression(&'a PrivateFieldExpression<'a>),
CallExpression(&'a CallExpression<'a>),
NewExpression(&'a NewExpression<'a>),
MetaProperty(&'a MetaProperty<'a>),
SpreadElement(&'a SpreadElement<'a>),
UpdateExpression(&'a UpdateExpression<'a>),
UnaryExpression(&'a UnaryExpression<'a>),
BinaryExpression(&'a BinaryExpression<'a>),
PrivateInExpression(&'a PrivateInExpression<'a>),
LogicalExpression(&'a LogicalExpression<'a>),
ConditionalExpression(&'a ConditionalExpression<'a>),
AssignmentExpression(&'a AssignmentExpression<'a>),
ArrayAssignmentTarget(&'a ArrayAssignmentTarget<'a>),
ObjectAssignmentTarget(&'a ObjectAssignmentTarget<'a>),
AssignmentTargetRest(&'a AssignmentTargetRest<'a>),
AssignmentTargetWithDefault(&'a AssignmentTargetWithDefault<'a>),
AssignmentTargetPropertyIdentifier(&'a AssignmentTargetPropertyIdentifier<'a>),
AssignmentTargetPropertyProperty(&'a AssignmentTargetPropertyProperty<'a>),
SequenceExpression(&'a SequenceExpression<'a>),
Super(&'a Super),
AwaitExpression(&'a AwaitExpression<'a>),
ChainExpression(&'a ChainExpression<'a>),
ParenthesizedExpression(&'a ParenthesizedExpression<'a>),
Directive(&'a Directive<'a>),
Hashbang(&'a Hashbang<'a>),
BlockStatement(&'a BlockStatement<'a>),
VariableDeclaration(&'a VariableDeclaration<'a>),
VariableDeclarator(&'a VariableDeclarator<'a>),
EmptyStatement(&'a EmptyStatement),
ExpressionStatement(&'a ExpressionStatement<'a>),
IfStatement(&'a IfStatement<'a>),
DoWhileStatement(&'a DoWhileStatement<'a>),
WhileStatement(&'a WhileStatement<'a>),
ForStatement(&'a ForStatement<'a>),
ForInStatement(&'a ForInStatement<'a>),
ForOfStatement(&'a ForOfStatement<'a>),
ContinueStatement(&'a ContinueStatement<'a>),
BreakStatement(&'a BreakStatement<'a>),
ReturnStatement(&'a ReturnStatement<'a>),
WithStatement(&'a WithStatement<'a>),
SwitchStatement(&'a SwitchStatement<'a>),
SwitchCase(&'a SwitchCase<'a>),
LabeledStatement(&'a LabeledStatement<'a>),
ThrowStatement(&'a ThrowStatement<'a>),
TryStatement(&'a TryStatement<'a>),
CatchClause(&'a CatchClause<'a>),
CatchParameter(&'a CatchParameter<'a>),
DebuggerStatement(&'a DebuggerStatement),
AssignmentPattern(&'a AssignmentPattern<'a>),
ObjectPattern(&'a ObjectPattern<'a>),
BindingProperty(&'a BindingProperty<'a>),
ArrayPattern(&'a ArrayPattern<'a>),
BindingRestElement(&'a BindingRestElement<'a>),
Function(&'a Function<'a>),
FormalParameters(&'a FormalParameters<'a>),
FormalParameter(&'a FormalParameter<'a>),
FormalParameterRest(&'a FormalParameterRest<'a>),
FunctionBody(&'a FunctionBody<'a>),
ArrowFunctionExpression(&'a ArrowFunctionExpression<'a>),
YieldExpression(&'a YieldExpression<'a>),
Class(&'a Class<'a>),
ClassBody(&'a ClassBody<'a>),
MethodDefinition(&'a MethodDefinition<'a>),
PropertyDefinition(&'a PropertyDefinition<'a>),
PrivateIdentifier(&'a PrivateIdentifier<'a>),
StaticBlock(&'a StaticBlock<'a>),
AccessorProperty(&'a AccessorProperty<'a>),
ImportExpression(&'a ImportExpression<'a>),
ImportDeclaration(&'a ImportDeclaration<'a>),
ImportSpecifier(&'a ImportSpecifier<'a>),
ImportDefaultSpecifier(&'a ImportDefaultSpecifier<'a>),
ImportNamespaceSpecifier(&'a ImportNamespaceSpecifier<'a>),
WithClause(&'a WithClause<'a>),
ImportAttribute(&'a ImportAttribute<'a>),
ExportNamedDeclaration(&'a ExportNamedDeclaration<'a>),
ExportDefaultDeclaration(&'a ExportDefaultDeclaration<'a>),
ExportAllDeclaration(&'a ExportAllDeclaration<'a>),
ExportSpecifier(&'a ExportSpecifier<'a>),
V8IntrinsicExpression(&'a V8IntrinsicExpression<'a>),
BooleanLiteral(&'a BooleanLiteral),
NullLiteral(&'a NullLiteral),
NumericLiteral(&'a NumericLiteral<'a>),
StringLiteral(&'a StringLiteral<'a>),
BigIntLiteral(&'a BigIntLiteral<'a>),
RegExpLiteral(&'a RegExpLiteral<'a>),
JSXElement(&'a JSXElement<'a>),
JSXOpeningElement(&'a JSXOpeningElement<'a>),
JSXClosingElement(&'a JSXClosingElement<'a>),
JSXFragment(&'a JSXFragment<'a>),
JSXOpeningFragment(&'a JSXOpeningFragment),
JSXClosingFragment(&'a JSXClosingFragment),
JSXNamespacedName(&'a JSXNamespacedName<'a>),
JSXMemberExpression(&'a JSXMemberExpression<'a>),
JSXExpressionContainer(&'a JSXExpressionContainer<'a>),
JSXEmptyExpression(&'a JSXEmptyExpression),
JSXAttribute(&'a JSXAttribute<'a>),
JSXSpreadAttribute(&'a JSXSpreadAttribute<'a>),
JSXIdentifier(&'a JSXIdentifier<'a>),
JSXSpreadChild(&'a JSXSpreadChild<'a>),
JSXText(&'a JSXText<'a>),
TSThisParameter(&'a TSThisParameter<'a>),
TSEnumDeclaration(&'a TSEnumDeclaration<'a>),
TSEnumBody(&'a TSEnumBody<'a>),
TSEnumMember(&'a TSEnumMember<'a>),
TSTypeAnnotation(&'a TSTypeAnnotation<'a>),
TSLiteralType(&'a TSLiteralType<'a>),
TSConditionalType(&'a TSConditionalType<'a>),
TSUnionType(&'a TSUnionType<'a>),
TSIntersectionType(&'a TSIntersectionType<'a>),
TSParenthesizedType(&'a TSParenthesizedType<'a>),
TSTypeOperator(&'a TSTypeOperator<'a>),
TSArrayType(&'a TSArrayType<'a>),
TSIndexedAccessType(&'a TSIndexedAccessType<'a>),
TSTupleType(&'a TSTupleType<'a>),
TSNamedTupleMember(&'a TSNamedTupleMember<'a>),
TSOptionalType(&'a TSOptionalType<'a>),
TSRestType(&'a TSRestType<'a>),
TSAnyKeyword(&'a TSAnyKeyword),
TSStringKeyword(&'a TSStringKeyword),
TSBooleanKeyword(&'a TSBooleanKeyword),
TSNumberKeyword(&'a TSNumberKeyword),
TSNeverKeyword(&'a TSNeverKeyword),
TSIntrinsicKeyword(&'a TSIntrinsicKeyword),
TSUnknownKeyword(&'a TSUnknownKeyword),
TSNullKeyword(&'a TSNullKeyword),
TSUndefinedKeyword(&'a TSUndefinedKeyword),
TSVoidKeyword(&'a TSVoidKeyword),
TSSymbolKeyword(&'a TSSymbolKeyword),
TSThisType(&'a TSThisType),
TSObjectKeyword(&'a TSObjectKeyword),
TSBigIntKeyword(&'a TSBigIntKeyword),
TSTypeReference(&'a TSTypeReference<'a>),
TSQualifiedName(&'a TSQualifiedName<'a>),
TSTypeParameterInstantiation(&'a TSTypeParameterInstantiation<'a>),
TSTypeParameter(&'a TSTypeParameter<'a>),
TSTypeParameterDeclaration(&'a TSTypeParameterDeclaration<'a>),
TSTypeAliasDeclaration(&'a TSTypeAliasDeclaration<'a>),
TSClassImplements(&'a TSClassImplements<'a>),
TSInterfaceDeclaration(&'a TSInterfaceDeclaration<'a>),
TSInterfaceBody(&'a TSInterfaceBody<'a>),
TSPropertySignature(&'a TSPropertySignature<'a>),
TSIndexSignature(&'a TSIndexSignature<'a>),
TSCallSignatureDeclaration(&'a TSCallSignatureDeclaration<'a>),
TSMethodSignature(&'a TSMethodSignature<'a>),
TSConstructSignatureDeclaration(&'a TSConstructSignatureDeclaration<'a>),
TSIndexSignatureName(&'a TSIndexSignatureName<'a>),
TSInterfaceHeritage(&'a TSInterfaceHeritage<'a>),
TSTypePredicate(&'a TSTypePredicate<'a>),
TSModuleDeclaration(&'a TSModuleDeclaration<'a>),
TSGlobalDeclaration(&'a TSGlobalDeclaration<'a>),
TSModuleBlock(&'a TSModuleBlock<'a>),
TSTypeLiteral(&'a TSTypeLiteral<'a>),
TSInferType(&'a TSInferType<'a>),
TSTypeQuery(&'a TSTypeQuery<'a>),
TSImportType(&'a TSImportType<'a>),
TSImportTypeQualifiedName(&'a TSImportTypeQualifiedName<'a>),
TSFunctionType(&'a TSFunctionType<'a>),
TSConstructorType(&'a TSConstructorType<'a>),
TSMappedType(&'a TSMappedType<'a>),
TSTemplateLiteralType(&'a TSTemplateLiteralType<'a>),
TSAsExpression(&'a TSAsExpression<'a>),
TSSatisfiesExpression(&'a TSSatisfiesExpression<'a>),
TSTypeAssertion(&'a TSTypeAssertion<'a>),
TSImportEqualsDeclaration(&'a TSImportEqualsDeclaration<'a>),
TSExternalModuleReference(&'a TSExternalModuleReference<'a>),
TSNonNullExpression(&'a TSNonNullExpression<'a>),
Decorator(&'a Decorator<'a>),
TSExportAssignment(&'a TSExportAssignment<'a>),
TSNamespaceExportDeclaration(&'a TSNamespaceExportDeclaration<'a>),
TSInstantiationExpression(&'a TSInstantiationExpression<'a>),
JSDocNullableType(&'a JSDocNullableType<'a>),
JSDocNonNullableType(&'a JSDocNonNullableType<'a>),
JSDocUnknownType(&'a JSDocUnknownType),
}Expand description
Untyped AST Node Kind
Variants§
Program(&'a Program<'a>)
IdentifierName(&'a IdentifierName<'a>)
IdentifierReference(&'a IdentifierReference<'a>)
BindingIdentifier(&'a BindingIdentifier<'a>)
LabelIdentifier(&'a LabelIdentifier<'a>)
ThisExpression(&'a ThisExpression)
ArrayExpression(&'a ArrayExpression<'a>)
Elision(&'a Elision)
ObjectExpression(&'a ObjectExpression<'a>)
ObjectProperty(&'a ObjectProperty<'a>)
TemplateLiteral(&'a TemplateLiteral<'a>)
TaggedTemplateExpression(&'a TaggedTemplateExpression<'a>)
TemplateElement(&'a TemplateElement<'a>)
ComputedMemberExpression(&'a ComputedMemberExpression<'a>)
StaticMemberExpression(&'a StaticMemberExpression<'a>)
PrivateFieldExpression(&'a PrivateFieldExpression<'a>)
CallExpression(&'a CallExpression<'a>)
NewExpression(&'a NewExpression<'a>)
MetaProperty(&'a MetaProperty<'a>)
SpreadElement(&'a SpreadElement<'a>)
UpdateExpression(&'a UpdateExpression<'a>)
UnaryExpression(&'a UnaryExpression<'a>)
BinaryExpression(&'a BinaryExpression<'a>)
PrivateInExpression(&'a PrivateInExpression<'a>)
LogicalExpression(&'a LogicalExpression<'a>)
ConditionalExpression(&'a ConditionalExpression<'a>)
AssignmentExpression(&'a AssignmentExpression<'a>)
ArrayAssignmentTarget(&'a ArrayAssignmentTarget<'a>)
ObjectAssignmentTarget(&'a ObjectAssignmentTarget<'a>)
AssignmentTargetRest(&'a AssignmentTargetRest<'a>)
AssignmentTargetWithDefault(&'a AssignmentTargetWithDefault<'a>)
AssignmentTargetPropertyIdentifier(&'a AssignmentTargetPropertyIdentifier<'a>)
AssignmentTargetPropertyProperty(&'a AssignmentTargetPropertyProperty<'a>)
SequenceExpression(&'a SequenceExpression<'a>)
Super(&'a Super)
AwaitExpression(&'a AwaitExpression<'a>)
ChainExpression(&'a ChainExpression<'a>)
ParenthesizedExpression(&'a ParenthesizedExpression<'a>)
Directive(&'a Directive<'a>)
Hashbang(&'a Hashbang<'a>)
BlockStatement(&'a BlockStatement<'a>)
VariableDeclaration(&'a VariableDeclaration<'a>)
VariableDeclarator(&'a VariableDeclarator<'a>)
EmptyStatement(&'a EmptyStatement)
ExpressionStatement(&'a ExpressionStatement<'a>)
IfStatement(&'a IfStatement<'a>)
DoWhileStatement(&'a DoWhileStatement<'a>)
WhileStatement(&'a WhileStatement<'a>)
ForStatement(&'a ForStatement<'a>)
ForInStatement(&'a ForInStatement<'a>)
ForOfStatement(&'a ForOfStatement<'a>)
ContinueStatement(&'a ContinueStatement<'a>)
BreakStatement(&'a BreakStatement<'a>)
ReturnStatement(&'a ReturnStatement<'a>)
WithStatement(&'a WithStatement<'a>)
SwitchStatement(&'a SwitchStatement<'a>)
SwitchCase(&'a SwitchCase<'a>)
LabeledStatement(&'a LabeledStatement<'a>)
ThrowStatement(&'a ThrowStatement<'a>)
TryStatement(&'a TryStatement<'a>)
CatchClause(&'a CatchClause<'a>)
CatchParameter(&'a CatchParameter<'a>)
DebuggerStatement(&'a DebuggerStatement)
AssignmentPattern(&'a AssignmentPattern<'a>)
ObjectPattern(&'a ObjectPattern<'a>)
BindingProperty(&'a BindingProperty<'a>)
ArrayPattern(&'a ArrayPattern<'a>)
BindingRestElement(&'a BindingRestElement<'a>)
Function(&'a Function<'a>)
FormalParameters(&'a FormalParameters<'a>)
FormalParameter(&'a FormalParameter<'a>)
FormalParameterRest(&'a FormalParameterRest<'a>)
FunctionBody(&'a FunctionBody<'a>)
ArrowFunctionExpression(&'a ArrowFunctionExpression<'a>)
YieldExpression(&'a YieldExpression<'a>)
Class(&'a Class<'a>)
ClassBody(&'a ClassBody<'a>)
MethodDefinition(&'a MethodDefinition<'a>)
PropertyDefinition(&'a PropertyDefinition<'a>)
PrivateIdentifier(&'a PrivateIdentifier<'a>)
StaticBlock(&'a StaticBlock<'a>)
AccessorProperty(&'a AccessorProperty<'a>)
ImportExpression(&'a ImportExpression<'a>)
ImportDeclaration(&'a ImportDeclaration<'a>)
ImportSpecifier(&'a ImportSpecifier<'a>)
ImportDefaultSpecifier(&'a ImportDefaultSpecifier<'a>)
ImportNamespaceSpecifier(&'a ImportNamespaceSpecifier<'a>)
WithClause(&'a WithClause<'a>)
ImportAttribute(&'a ImportAttribute<'a>)
ExportNamedDeclaration(&'a ExportNamedDeclaration<'a>)
ExportDefaultDeclaration(&'a ExportDefaultDeclaration<'a>)
ExportAllDeclaration(&'a ExportAllDeclaration<'a>)
ExportSpecifier(&'a ExportSpecifier<'a>)
V8IntrinsicExpression(&'a V8IntrinsicExpression<'a>)
BooleanLiteral(&'a BooleanLiteral)
NullLiteral(&'a NullLiteral)
NumericLiteral(&'a NumericLiteral<'a>)
StringLiteral(&'a StringLiteral<'a>)
BigIntLiteral(&'a BigIntLiteral<'a>)
RegExpLiteral(&'a RegExpLiteral<'a>)
JSXElement(&'a JSXElement<'a>)
JSXOpeningElement(&'a JSXOpeningElement<'a>)
JSXClosingElement(&'a JSXClosingElement<'a>)
JSXFragment(&'a JSXFragment<'a>)
JSXOpeningFragment(&'a JSXOpeningFragment)
JSXClosingFragment(&'a JSXClosingFragment)
JSXNamespacedName(&'a JSXNamespacedName<'a>)
JSXMemberExpression(&'a JSXMemberExpression<'a>)
JSXExpressionContainer(&'a JSXExpressionContainer<'a>)
JSXEmptyExpression(&'a JSXEmptyExpression)
JSXAttribute(&'a JSXAttribute<'a>)
JSXSpreadAttribute(&'a JSXSpreadAttribute<'a>)
JSXIdentifier(&'a JSXIdentifier<'a>)
JSXSpreadChild(&'a JSXSpreadChild<'a>)
JSXText(&'a JSXText<'a>)
TSThisParameter(&'a TSThisParameter<'a>)
TSEnumDeclaration(&'a TSEnumDeclaration<'a>)
TSEnumBody(&'a TSEnumBody<'a>)
TSEnumMember(&'a TSEnumMember<'a>)
TSTypeAnnotation(&'a TSTypeAnnotation<'a>)
TSLiteralType(&'a TSLiteralType<'a>)
TSConditionalType(&'a TSConditionalType<'a>)
TSUnionType(&'a TSUnionType<'a>)
TSIntersectionType(&'a TSIntersectionType<'a>)
TSParenthesizedType(&'a TSParenthesizedType<'a>)
TSTypeOperator(&'a TSTypeOperator<'a>)
TSArrayType(&'a TSArrayType<'a>)
TSIndexedAccessType(&'a TSIndexedAccessType<'a>)
TSTupleType(&'a TSTupleType<'a>)
TSNamedTupleMember(&'a TSNamedTupleMember<'a>)
TSOptionalType(&'a TSOptionalType<'a>)
TSRestType(&'a TSRestType<'a>)
TSAnyKeyword(&'a TSAnyKeyword)
TSStringKeyword(&'a TSStringKeyword)
TSBooleanKeyword(&'a TSBooleanKeyword)
TSNumberKeyword(&'a TSNumberKeyword)
TSNeverKeyword(&'a TSNeverKeyword)
TSIntrinsicKeyword(&'a TSIntrinsicKeyword)
TSUnknownKeyword(&'a TSUnknownKeyword)
TSNullKeyword(&'a TSNullKeyword)
TSUndefinedKeyword(&'a TSUndefinedKeyword)
TSVoidKeyword(&'a TSVoidKeyword)
TSSymbolKeyword(&'a TSSymbolKeyword)
TSThisType(&'a TSThisType)
TSObjectKeyword(&'a TSObjectKeyword)
TSBigIntKeyword(&'a TSBigIntKeyword)
TSTypeReference(&'a TSTypeReference<'a>)
TSQualifiedName(&'a TSQualifiedName<'a>)
TSTypeParameterInstantiation(&'a TSTypeParameterInstantiation<'a>)
TSTypeParameter(&'a TSTypeParameter<'a>)
TSTypeParameterDeclaration(&'a TSTypeParameterDeclaration<'a>)
TSTypeAliasDeclaration(&'a TSTypeAliasDeclaration<'a>)
TSClassImplements(&'a TSClassImplements<'a>)
TSInterfaceDeclaration(&'a TSInterfaceDeclaration<'a>)
TSInterfaceBody(&'a TSInterfaceBody<'a>)
TSPropertySignature(&'a TSPropertySignature<'a>)
TSIndexSignature(&'a TSIndexSignature<'a>)
TSCallSignatureDeclaration(&'a TSCallSignatureDeclaration<'a>)
TSMethodSignature(&'a TSMethodSignature<'a>)
TSConstructSignatureDeclaration(&'a TSConstructSignatureDeclaration<'a>)
TSIndexSignatureName(&'a TSIndexSignatureName<'a>)
TSInterfaceHeritage(&'a TSInterfaceHeritage<'a>)
TSTypePredicate(&'a TSTypePredicate<'a>)
TSModuleDeclaration(&'a TSModuleDeclaration<'a>)
TSGlobalDeclaration(&'a TSGlobalDeclaration<'a>)
TSModuleBlock(&'a TSModuleBlock<'a>)
TSTypeLiteral(&'a TSTypeLiteral<'a>)
TSInferType(&'a TSInferType<'a>)
TSTypeQuery(&'a TSTypeQuery<'a>)
TSImportType(&'a TSImportType<'a>)
TSImportTypeQualifiedName(&'a TSImportTypeQualifiedName<'a>)
TSFunctionType(&'a TSFunctionType<'a>)
TSConstructorType(&'a TSConstructorType<'a>)
TSMappedType(&'a TSMappedType<'a>)
TSTemplateLiteralType(&'a TSTemplateLiteralType<'a>)
TSAsExpression(&'a TSAsExpression<'a>)
TSSatisfiesExpression(&'a TSSatisfiesExpression<'a>)
TSTypeAssertion(&'a TSTypeAssertion<'a>)
TSImportEqualsDeclaration(&'a TSImportEqualsDeclaration<'a>)
TSExternalModuleReference(&'a TSExternalModuleReference<'a>)
TSNonNullExpression(&'a TSNonNullExpression<'a>)
Decorator(&'a Decorator<'a>)
TSExportAssignment(&'a TSExportAssignment<'a>)
TSNamespaceExportDeclaration(&'a TSNamespaceExportDeclaration<'a>)
TSInstantiationExpression(&'a TSInstantiationExpression<'a>)
JSDocNullableType(&'a JSDocNullableType<'a>)
JSDocNonNullableType(&'a JSDocNonNullableType<'a>)
JSDocUnknownType(&'a JSDocUnknownType)
Implementations§
Source§impl<'a> AstKind<'a>
impl<'a> AstKind<'a>
Sourcepub fn is_statement(self) -> bool
pub fn is_statement(self) -> bool
Check if this AST node is a statement
Returns true for all statement types including iteration statements,
control flow statements, and declaration statements.
Sourcepub fn is_declaration(self) -> bool
pub fn is_declaration(self) -> bool
Check if this AST node is a declaration
Returns true for function declarations, class declarations,
variable declarations, TypeScript declarations, and module declarations.
Sourcepub fn is_module_declaration(self) -> bool
pub fn is_module_declaration(self) -> bool
Check if this AST node is a module declaration
Returns true for import/export declarations.
Sourcepub fn as_module_declaration_kind(&self) -> Option<ModuleDeclarationKind<'a>>
pub fn as_module_declaration_kind(&self) -> Option<ModuleDeclarationKind<'a>>
Attempt to convert this AST node to a module declaration kind
Returns Some(ModuleDeclarationKind) if this is a module declaration,
None otherwise.
Sourcepub fn is_iteration_statement(self) -> bool
pub fn is_iteration_statement(self) -> bool
Check if this AST node is an iteration statement
Returns true for do-while, while, for-in, for-of, and for statements.
Sourcepub fn is_identifier(self) -> bool
pub fn is_identifier(self) -> bool
Check if this AST node is any kind of identifier
Returns true for binding identifiers, identifier references,
and label identifiers.
Sourcepub fn is_type(self) -> bool
pub fn is_type(self) -> bool
Check if this AST node is a TypeScript type
Returns true for all TypeScript type nodes including keywords,
type references, unions, intersections, etc.
Sourcepub fn is_literal(self) -> bool
pub fn is_literal(self) -> bool
Check if this AST node is a literal
Returns true for numeric, string, boolean, null, bigint,
regexp, and template literals.
Sourcepub fn is_function_like(self) -> bool
pub fn is_function_like(self) -> bool
Check if this AST node is function-like
Returns true for function expressions/declarations and arrow functions.
Sourcepub fn has_argument_with_span(&self, span: Span) -> bool
pub fn has_argument_with_span(&self, span: Span) -> bool
Check if this CallExpression or NewExpression has an argument with the given span
This is useful for determining if a node is an argument to a call expression
when traversing the AST, particularly after the removal of AstKind::Argument.
§Examples
// Check if a node is an argument to its parent call expression
if parent.has_argument_with_span(node.span()) {
// This node is an argument
}Sourcepub fn is_callee_with_span(&self, span: Span) -> bool
pub fn is_callee_with_span(&self, span: Span) -> bool
Check if this CallExpression or NewExpression has the given span as its callee
This is useful for determining if a node is the callee of a call expression when traversing the AST.
§Examples
// Detect eval() calls
if let AstKind::IdentifierReference(ident) = node.kind() {
if parent.is_callee_with_span(ident.span) && ident.name == "eval" {
// This is an eval() call
}
}Sourcepub fn identifier_name(self) -> Option<Ident<'a>>
pub fn identifier_name(self) -> Option<Ident<'a>>
Get the name of an identifier node
Returns the identifier name if this is any kind of identifier node,
None otherwise.
Sourcepub fn is_specific_id_reference(&self, name: &str) -> bool
pub fn is_specific_id_reference(&self, name: &str) -> bool
Check if this is an identifier reference with a specific name
Returns true if this is an IdentifierReference with the given name.
Sourcepub fn is_member_expression_kind(&self) -> bool
pub fn is_member_expression_kind(&self) -> bool
Returns whether this expression is a member expression, such as obj.prop, obj["prop"], or obj.#prop.
Sourcepub fn as_member_expression_kind(&self) -> Option<MemberExpressionKind<'a>>
pub fn as_member_expression_kind(&self) -> Option<MemberExpressionKind<'a>>
If this is some kind of member expression, returns it as a
MemberExpressionKind. Otherwise, returns None.
Sourcepub fn is_property_key(&self) -> bool
pub fn is_property_key(&self) -> bool
Check if this AST node is a property key
Returns true for identifier names and private identifiers used as property keys.
Sourcepub fn as_property_key_kind(&self) -> Option<PropertyKeyKind<'a>>
pub fn as_property_key_kind(&self) -> Option<PropertyKeyKind<'a>>
Attempt to convert this AST node to a property key kind
Returns Some(PropertyKeyKind) if this is a property key,
None otherwise.
Sourcepub fn from_expression(e: &'a Expression<'a>) -> AstKind<'a>
pub fn from_expression(e: &'a Expression<'a>) -> AstKind<'a>
Create an AstKind from an expression
Converts any expression type to its corresponding AstKind variant.
Sourcepub fn ident_reference_is_assigned_to_in_parent(
&self,
parent: &AstKind<'a>,
) -> bool
pub fn ident_reference_is_assigned_to_in_parent( &self, parent: &AstKind<'a>, ) -> bool
Given an AstKind which is an IdentifierReference, and AstKind representing its parent node,
returns true if the identifier is assigned to.
Note: parent must be the parent node of the identifier, and self must be an IdentifierReference.
This method does not check those things, and may return incorrect results if either is not true.
Source§impl AstKind<'_>
impl AstKind<'_>
Sourcepub fn debug_name(&self) -> Cow<'_, str>
pub fn debug_name(&self) -> Cow<'_, str>
Get the AST kind name with minimal details. Particularly useful for when debugging an iteration over an AST.
Note that this method does not exist in release builds. Do not include usage of this method within your code.
Source§impl<'a> AstKind<'a>
impl<'a> AstKind<'a>
pub fn as_program(self) -> Option<&'a Program<'a>>
pub fn as_identifier_name(self) -> Option<&'a IdentifierName<'a>>
pub fn as_identifier_reference(self) -> Option<&'a IdentifierReference<'a>>
pub fn as_binding_identifier(self) -> Option<&'a BindingIdentifier<'a>>
pub fn as_label_identifier(self) -> Option<&'a LabelIdentifier<'a>>
pub fn as_this_expression(self) -> Option<&'a ThisExpression>
pub fn as_array_expression(self) -> Option<&'a ArrayExpression<'a>>
pub fn as_elision(self) -> Option<&'a Elision>
pub fn as_object_expression(self) -> Option<&'a ObjectExpression<'a>>
pub fn as_object_property(self) -> Option<&'a ObjectProperty<'a>>
pub fn as_template_literal(self) -> Option<&'a TemplateLiteral<'a>>
pub fn as_tagged_template_expression( self, ) -> Option<&'a TaggedTemplateExpression<'a>>
pub fn as_template_element(self) -> Option<&'a TemplateElement<'a>>
pub fn as_computed_member_expression( self, ) -> Option<&'a ComputedMemberExpression<'a>>
pub fn as_static_member_expression( self, ) -> Option<&'a StaticMemberExpression<'a>>
pub fn as_private_field_expression( self, ) -> Option<&'a PrivateFieldExpression<'a>>
pub fn as_call_expression(self) -> Option<&'a CallExpression<'a>>
pub fn as_new_expression(self) -> Option<&'a NewExpression<'a>>
pub fn as_meta_property(self) -> Option<&'a MetaProperty<'a>>
pub fn as_spread_element(self) -> Option<&'a SpreadElement<'a>>
pub fn as_update_expression(self) -> Option<&'a UpdateExpression<'a>>
pub fn as_unary_expression(self) -> Option<&'a UnaryExpression<'a>>
pub fn as_binary_expression(self) -> Option<&'a BinaryExpression<'a>>
pub fn as_private_in_expression(self) -> Option<&'a PrivateInExpression<'a>>
pub fn as_logical_expression(self) -> Option<&'a LogicalExpression<'a>>
pub fn as_conditional_expression(self) -> Option<&'a ConditionalExpression<'a>>
pub fn as_assignment_expression(self) -> Option<&'a AssignmentExpression<'a>>
pub fn as_array_assignment_target(self) -> Option<&'a ArrayAssignmentTarget<'a>>
pub fn as_object_assignment_target( self, ) -> Option<&'a ObjectAssignmentTarget<'a>>
pub fn as_assignment_target_rest(self) -> Option<&'a AssignmentTargetRest<'a>>
pub fn as_assignment_target_with_default( self, ) -> Option<&'a AssignmentTargetWithDefault<'a>>
pub fn as_assignment_target_property_identifier( self, ) -> Option<&'a AssignmentTargetPropertyIdentifier<'a>>
pub fn as_assignment_target_property_property( self, ) -> Option<&'a AssignmentTargetPropertyProperty<'a>>
pub fn as_sequence_expression(self) -> Option<&'a SequenceExpression<'a>>
pub fn as_super(self) -> Option<&'a Super>
pub fn as_await_expression(self) -> Option<&'a AwaitExpression<'a>>
pub fn as_chain_expression(self) -> Option<&'a ChainExpression<'a>>
pub fn as_parenthesized_expression( self, ) -> Option<&'a ParenthesizedExpression<'a>>
pub fn as_directive(self) -> Option<&'a Directive<'a>>
pub fn as_hashbang(self) -> Option<&'a Hashbang<'a>>
pub fn as_block_statement(self) -> Option<&'a BlockStatement<'a>>
pub fn as_variable_declaration(self) -> Option<&'a VariableDeclaration<'a>>
pub fn as_variable_declarator(self) -> Option<&'a VariableDeclarator<'a>>
pub fn as_empty_statement(self) -> Option<&'a EmptyStatement>
pub fn as_expression_statement(self) -> Option<&'a ExpressionStatement<'a>>
pub fn as_if_statement(self) -> Option<&'a IfStatement<'a>>
pub fn as_do_while_statement(self) -> Option<&'a DoWhileStatement<'a>>
pub fn as_while_statement(self) -> Option<&'a WhileStatement<'a>>
pub fn as_for_statement(self) -> Option<&'a ForStatement<'a>>
pub fn as_for_in_statement(self) -> Option<&'a ForInStatement<'a>>
pub fn as_for_of_statement(self) -> Option<&'a ForOfStatement<'a>>
pub fn as_continue_statement(self) -> Option<&'a ContinueStatement<'a>>
pub fn as_break_statement(self) -> Option<&'a BreakStatement<'a>>
pub fn as_return_statement(self) -> Option<&'a ReturnStatement<'a>>
pub fn as_with_statement(self) -> Option<&'a WithStatement<'a>>
pub fn as_switch_statement(self) -> Option<&'a SwitchStatement<'a>>
pub fn as_switch_case(self) -> Option<&'a SwitchCase<'a>>
pub fn as_labeled_statement(self) -> Option<&'a LabeledStatement<'a>>
pub fn as_throw_statement(self) -> Option<&'a ThrowStatement<'a>>
pub fn as_try_statement(self) -> Option<&'a TryStatement<'a>>
pub fn as_catch_clause(self) -> Option<&'a CatchClause<'a>>
pub fn as_catch_parameter(self) -> Option<&'a CatchParameter<'a>>
pub fn as_debugger_statement(self) -> Option<&'a DebuggerStatement>
pub fn as_assignment_pattern(self) -> Option<&'a AssignmentPattern<'a>>
pub fn as_object_pattern(self) -> Option<&'a ObjectPattern<'a>>
pub fn as_binding_property(self) -> Option<&'a BindingProperty<'a>>
pub fn as_array_pattern(self) -> Option<&'a ArrayPattern<'a>>
pub fn as_binding_rest_element(self) -> Option<&'a BindingRestElement<'a>>
pub fn as_function(self) -> Option<&'a Function<'a>>
pub fn as_formal_parameters(self) -> Option<&'a FormalParameters<'a>>
pub fn as_formal_parameter(self) -> Option<&'a FormalParameter<'a>>
pub fn as_formal_parameter_rest(self) -> Option<&'a FormalParameterRest<'a>>
pub fn as_function_body(self) -> Option<&'a FunctionBody<'a>>
pub fn as_arrow_function_expression( self, ) -> Option<&'a ArrowFunctionExpression<'a>>
pub fn as_yield_expression(self) -> Option<&'a YieldExpression<'a>>
pub fn as_class(self) -> Option<&'a Class<'a>>
pub fn as_class_body(self) -> Option<&'a ClassBody<'a>>
pub fn as_method_definition(self) -> Option<&'a MethodDefinition<'a>>
pub fn as_property_definition(self) -> Option<&'a PropertyDefinition<'a>>
pub fn as_private_identifier(self) -> Option<&'a PrivateIdentifier<'a>>
pub fn as_static_block(self) -> Option<&'a StaticBlock<'a>>
pub fn as_accessor_property(self) -> Option<&'a AccessorProperty<'a>>
pub fn as_import_expression(self) -> Option<&'a ImportExpression<'a>>
pub fn as_import_declaration(self) -> Option<&'a ImportDeclaration<'a>>
pub fn as_import_specifier(self) -> Option<&'a ImportSpecifier<'a>>
pub fn as_import_default_specifier( self, ) -> Option<&'a ImportDefaultSpecifier<'a>>
pub fn as_import_namespace_specifier( self, ) -> Option<&'a ImportNamespaceSpecifier<'a>>
pub fn as_with_clause(self) -> Option<&'a WithClause<'a>>
pub fn as_import_attribute(self) -> Option<&'a ImportAttribute<'a>>
pub fn as_export_named_declaration( self, ) -> Option<&'a ExportNamedDeclaration<'a>>
pub fn as_export_default_declaration( self, ) -> Option<&'a ExportDefaultDeclaration<'a>>
pub fn as_export_all_declaration(self) -> Option<&'a ExportAllDeclaration<'a>>
pub fn as_export_specifier(self) -> Option<&'a ExportSpecifier<'a>>
pub fn as_v8_intrinsic_expression(self) -> Option<&'a V8IntrinsicExpression<'a>>
pub fn as_boolean_literal(self) -> Option<&'a BooleanLiteral>
pub fn as_null_literal(self) -> Option<&'a NullLiteral>
pub fn as_numeric_literal(self) -> Option<&'a NumericLiteral<'a>>
pub fn as_string_literal(self) -> Option<&'a StringLiteral<'a>>
pub fn as_big_int_literal(self) -> Option<&'a BigIntLiteral<'a>>
pub fn as_reg_exp_literal(self) -> Option<&'a RegExpLiteral<'a>>
pub fn as_jsx_element(self) -> Option<&'a JSXElement<'a>>
pub fn as_jsx_opening_element(self) -> Option<&'a JSXOpeningElement<'a>>
pub fn as_jsx_closing_element(self) -> Option<&'a JSXClosingElement<'a>>
pub fn as_jsx_fragment(self) -> Option<&'a JSXFragment<'a>>
pub fn as_jsx_opening_fragment(self) -> Option<&'a JSXOpeningFragment>
pub fn as_jsx_closing_fragment(self) -> Option<&'a JSXClosingFragment>
pub fn as_jsx_namespaced_name(self) -> Option<&'a JSXNamespacedName<'a>>
pub fn as_jsx_member_expression(self) -> Option<&'a JSXMemberExpression<'a>>
pub fn as_jsx_expression_container( self, ) -> Option<&'a JSXExpressionContainer<'a>>
pub fn as_jsx_empty_expression(self) -> Option<&'a JSXEmptyExpression>
pub fn as_jsx_attribute(self) -> Option<&'a JSXAttribute<'a>>
pub fn as_jsx_spread_attribute(self) -> Option<&'a JSXSpreadAttribute<'a>>
pub fn as_jsx_identifier(self) -> Option<&'a JSXIdentifier<'a>>
pub fn as_jsx_spread_child(self) -> Option<&'a JSXSpreadChild<'a>>
pub fn as_jsx_text(self) -> Option<&'a JSXText<'a>>
pub fn as_ts_this_parameter(self) -> Option<&'a TSThisParameter<'a>>
pub fn as_ts_enum_declaration(self) -> Option<&'a TSEnumDeclaration<'a>>
pub fn as_ts_enum_body(self) -> Option<&'a TSEnumBody<'a>>
pub fn as_ts_enum_member(self) -> Option<&'a TSEnumMember<'a>>
pub fn as_ts_type_annotation(self) -> Option<&'a TSTypeAnnotation<'a>>
pub fn as_ts_literal_type(self) -> Option<&'a TSLiteralType<'a>>
pub fn as_ts_conditional_type(self) -> Option<&'a TSConditionalType<'a>>
pub fn as_ts_union_type(self) -> Option<&'a TSUnionType<'a>>
pub fn as_ts_intersection_type(self) -> Option<&'a TSIntersectionType<'a>>
pub fn as_ts_parenthesized_type(self) -> Option<&'a TSParenthesizedType<'a>>
pub fn as_ts_type_operator(self) -> Option<&'a TSTypeOperator<'a>>
pub fn as_ts_array_type(self) -> Option<&'a TSArrayType<'a>>
pub fn as_ts_indexed_access_type(self) -> Option<&'a TSIndexedAccessType<'a>>
pub fn as_ts_tuple_type(self) -> Option<&'a TSTupleType<'a>>
pub fn as_ts_named_tuple_member(self) -> Option<&'a TSNamedTupleMember<'a>>
pub fn as_ts_optional_type(self) -> Option<&'a TSOptionalType<'a>>
pub fn as_ts_rest_type(self) -> Option<&'a TSRestType<'a>>
pub fn as_ts_any_keyword(self) -> Option<&'a TSAnyKeyword>
pub fn as_ts_string_keyword(self) -> Option<&'a TSStringKeyword>
pub fn as_ts_boolean_keyword(self) -> Option<&'a TSBooleanKeyword>
pub fn as_ts_number_keyword(self) -> Option<&'a TSNumberKeyword>
pub fn as_ts_never_keyword(self) -> Option<&'a TSNeverKeyword>
pub fn as_ts_intrinsic_keyword(self) -> Option<&'a TSIntrinsicKeyword>
pub fn as_ts_unknown_keyword(self) -> Option<&'a TSUnknownKeyword>
pub fn as_ts_null_keyword(self) -> Option<&'a TSNullKeyword>
pub fn as_ts_undefined_keyword(self) -> Option<&'a TSUndefinedKeyword>
pub fn as_ts_void_keyword(self) -> Option<&'a TSVoidKeyword>
pub fn as_ts_symbol_keyword(self) -> Option<&'a TSSymbolKeyword>
pub fn as_ts_this_type(self) -> Option<&'a TSThisType>
pub fn as_ts_object_keyword(self) -> Option<&'a TSObjectKeyword>
pub fn as_ts_big_int_keyword(self) -> Option<&'a TSBigIntKeyword>
pub fn as_ts_type_reference(self) -> Option<&'a TSTypeReference<'a>>
pub fn as_ts_qualified_name(self) -> Option<&'a TSQualifiedName<'a>>
pub fn as_ts_type_parameter_instantiation( self, ) -> Option<&'a TSTypeParameterInstantiation<'a>>
pub fn as_ts_type_parameter(self) -> Option<&'a TSTypeParameter<'a>>
pub fn as_ts_type_parameter_declaration( self, ) -> Option<&'a TSTypeParameterDeclaration<'a>>
pub fn as_ts_type_alias_declaration( self, ) -> Option<&'a TSTypeAliasDeclaration<'a>>
pub fn as_ts_class_implements(self) -> Option<&'a TSClassImplements<'a>>
pub fn as_ts_interface_declaration( self, ) -> Option<&'a TSInterfaceDeclaration<'a>>
pub fn as_ts_interface_body(self) -> Option<&'a TSInterfaceBody<'a>>
pub fn as_ts_property_signature(self) -> Option<&'a TSPropertySignature<'a>>
pub fn as_ts_index_signature(self) -> Option<&'a TSIndexSignature<'a>>
pub fn as_ts_call_signature_declaration( self, ) -> Option<&'a TSCallSignatureDeclaration<'a>>
pub fn as_ts_method_signature(self) -> Option<&'a TSMethodSignature<'a>>
pub fn as_ts_construct_signature_declaration( self, ) -> Option<&'a TSConstructSignatureDeclaration<'a>>
pub fn as_ts_index_signature_name(self) -> Option<&'a TSIndexSignatureName<'a>>
pub fn as_ts_interface_heritage(self) -> Option<&'a TSInterfaceHeritage<'a>>
pub fn as_ts_type_predicate(self) -> Option<&'a TSTypePredicate<'a>>
pub fn as_ts_module_declaration(self) -> Option<&'a TSModuleDeclaration<'a>>
pub fn as_ts_global_declaration(self) -> Option<&'a TSGlobalDeclaration<'a>>
pub fn as_ts_module_block(self) -> Option<&'a TSModuleBlock<'a>>
pub fn as_ts_type_literal(self) -> Option<&'a TSTypeLiteral<'a>>
pub fn as_ts_infer_type(self) -> Option<&'a TSInferType<'a>>
pub fn as_ts_type_query(self) -> Option<&'a TSTypeQuery<'a>>
pub fn as_ts_import_type(self) -> Option<&'a TSImportType<'a>>
pub fn as_ts_import_type_qualified_name( self, ) -> Option<&'a TSImportTypeQualifiedName<'a>>
pub fn as_ts_function_type(self) -> Option<&'a TSFunctionType<'a>>
pub fn as_ts_constructor_type(self) -> Option<&'a TSConstructorType<'a>>
pub fn as_ts_mapped_type(self) -> Option<&'a TSMappedType<'a>>
pub fn as_ts_template_literal_type( self, ) -> Option<&'a TSTemplateLiteralType<'a>>
pub fn as_ts_as_expression(self) -> Option<&'a TSAsExpression<'a>>
pub fn as_ts_satisfies_expression(self) -> Option<&'a TSSatisfiesExpression<'a>>
pub fn as_ts_type_assertion(self) -> Option<&'a TSTypeAssertion<'a>>
pub fn as_ts_import_equals_declaration( self, ) -> Option<&'a TSImportEqualsDeclaration<'a>>
pub fn as_ts_external_module_reference( self, ) -> Option<&'a TSExternalModuleReference<'a>>
pub fn as_ts_non_null_expression(self) -> Option<&'a TSNonNullExpression<'a>>
pub fn as_decorator(self) -> Option<&'a Decorator<'a>>
pub fn as_ts_export_assignment(self) -> Option<&'a TSExportAssignment<'a>>
pub fn as_ts_namespace_export_declaration( self, ) -> Option<&'a TSNamespaceExportDeclaration<'a>>
pub fn as_ts_instantiation_expression( self, ) -> Option<&'a TSInstantiationExpression<'a>>
pub fn as_js_doc_nullable_type(self) -> Option<&'a JSDocNullableType<'a>>
pub fn as_js_doc_non_nullable_type(self) -> Option<&'a JSDocNonNullableType<'a>>
pub fn as_js_doc_unknown_type(self) -> Option<&'a JSDocUnknownType>
Trait Implementations§
impl<'a> Copy for AstKind<'a>
Auto Trait Implementations§
impl<'a> Freeze for AstKind<'a>
impl<'a> !RefUnwindSafe for AstKind<'a>
impl<'a> !Send for AstKind<'a>
impl<'a> !Sync for AstKind<'a>
impl<'a> Unpin for AstKind<'a>
impl<'a> UnsafeUnpin for AstKind<'a>
impl<'a> !UnwindSafe for AstKind<'a>
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<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<D> OwoColorize for D
impl<D> OwoColorize for D
Source§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
Source§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
Source§fn black(&self) -> FgColorDisplay<'_, Black, Self>
fn black(&self) -> FgColorDisplay<'_, Black, Self>
Source§fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
Source§fn red(&self) -> FgColorDisplay<'_, Red, Self>
fn red(&self) -> FgColorDisplay<'_, Red, Self>
Source§fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
Source§fn green(&self) -> FgColorDisplay<'_, Green, Self>
fn green(&self) -> FgColorDisplay<'_, Green, Self>
Source§fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
Source§fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
Source§fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
Source§fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
Source§fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
Source§fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
Source§fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
Source§fn white(&self) -> FgColorDisplay<'_, White, Self>
fn white(&self) -> FgColorDisplay<'_, White, Self>
Source§fn on_white(&self) -> BgColorDisplay<'_, White, Self>
fn on_white(&self) -> BgColorDisplay<'_, White, Self>
Source§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
Source§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
Source§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
Source§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
Source§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
Source§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
Source§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
Source§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
Source§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
Source§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
Source§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
Source§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
Source§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
Source§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
Source§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
Source§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
Source§fn bold(&self) -> BoldDisplay<'_, Self>
fn bold(&self) -> BoldDisplay<'_, Self>
Source§fn dimmed(&self) -> DimDisplay<'_, Self>
fn dimmed(&self) -> DimDisplay<'_, Self>
Source§fn italic(&self) -> ItalicDisplay<'_, Self>
fn italic(&self) -> ItalicDisplay<'_, Self>
Source§fn underline(&self) -> UnderlineDisplay<'_, Self>
fn underline(&self) -> UnderlineDisplay<'_, Self>
Source§fn blink(&self) -> BlinkDisplay<'_, Self>
fn blink(&self) -> BlinkDisplay<'_, Self>
Source§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
Source§fn reversed(&self) -> ReversedDisplay<'_, Self>
fn reversed(&self) -> ReversedDisplay<'_, Self>
Source§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
Source§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg or
a color-specific method, such as OwoColorize::green, Read moreSource§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg or
a color-specific method, such as OwoColorize::on_yellow, Read more