pub trait VisitMut {
Show 21 methods
// Provided methods
fn visit_mut_atom(&mut self, node: &mut Atom) { ... }
fn visit_mut_attribute(&mut self, node: &mut Attribute) { ... }
fn visit_mut_attribute_token(&mut self, node: &mut AttributeToken) { ... }
fn visit_mut_attribute_tokens(&mut self, node: &mut Vec<AttributeToken>) { ... }
fn visit_mut_attributes(&mut self, node: &mut Vec<Attribute>) { ... }
fn visit_mut_cdata_section(&mut self, node: &mut CdataSection) { ... }
fn visit_mut_child(&mut self, node: &mut Child) { ... }
fn visit_mut_childs(&mut self, node: &mut Vec<Child>) { ... }
fn visit_mut_comment(&mut self, node: &mut Comment) { ... }
fn visit_mut_document(&mut self, node: &mut Document) { ... }
fn visit_mut_document_mode(&mut self, node: &mut DocumentMode) { ... }
fn visit_mut_document_type(&mut self, node: &mut DocumentType) { ... }
fn visit_mut_element(&mut self, node: &mut Element) { ... }
fn visit_mut_namespace(&mut self, node: &mut Namespace) { ... }
fn visit_mut_opt_atom(&mut self, node: &mut Option<Atom>) { ... }
fn visit_mut_opt_namespace(&mut self, node: &mut Option<Namespace>) { ... }
fn visit_mut_processing_instruction(
&mut self,
node: &mut ProcessingInstruction,
) { ... }
fn visit_mut_span(&mut self, node: &mut Span) { ... }
fn visit_mut_text(&mut self, node: &mut Text) { ... }
fn visit_mut_token(&mut self, node: &mut Token) { ... }
fn visit_mut_token_and_span(&mut self, node: &mut TokenAndSpan) { ... }
}
Expand description
A visitor trait for traversing the AST.
Provided Methods§
sourcefn visit_mut_atom(&mut self, node: &mut Atom)
fn visit_mut_atom(&mut self, node: &mut Atom)
Visit a node of type swc_atoms :: Atom
.
By default, this method calls [swc_atoms :: Atom::visit_mut_children_with
]. If you want to recurse, you need to call it manually.
sourcefn visit_mut_attribute(&mut self, node: &mut Attribute)
fn visit_mut_attribute(&mut self, node: &mut Attribute)
Visit a node of type Attribute
.
By default, this method calls [Attribute::visit_mut_children_with
]. If you want to recurse, you need to call it manually.
sourcefn visit_mut_attribute_token(&mut self, node: &mut AttributeToken)
fn visit_mut_attribute_token(&mut self, node: &mut AttributeToken)
Visit a node of type AttributeToken
.
By default, this method calls [AttributeToken::visit_mut_children_with
]. If you want to recurse, you need to call it manually.
sourcefn visit_mut_attribute_tokens(&mut self, node: &mut Vec<AttributeToken>)
fn visit_mut_attribute_tokens(&mut self, node: &mut Vec<AttributeToken>)
Visit a node of type Vec < AttributeToken >
.
By default, this method calls [Vec < AttributeToken >::visit_mut_children_with
]. If you want to recurse, you need to call it manually.
sourcefn visit_mut_attributes(&mut self, node: &mut Vec<Attribute>)
fn visit_mut_attributes(&mut self, node: &mut Vec<Attribute>)
Visit a node of type Vec < Attribute >
.
By default, this method calls [Vec < Attribute >::visit_mut_children_with
]. If you want to recurse, you need to call it manually.
sourcefn visit_mut_cdata_section(&mut self, node: &mut CdataSection)
fn visit_mut_cdata_section(&mut self, node: &mut CdataSection)
Visit a node of type CdataSection
.
By default, this method calls [CdataSection::visit_mut_children_with
]. If you want to recurse, you need to call it manually.
sourcefn visit_mut_child(&mut self, node: &mut Child)
fn visit_mut_child(&mut self, node: &mut Child)
Visit a node of type Child
.
By default, this method calls [Child::visit_mut_children_with
]. If you want to recurse, you need to call it manually.
sourcefn visit_mut_childs(&mut self, node: &mut Vec<Child>)
fn visit_mut_childs(&mut self, node: &mut Vec<Child>)
Visit a node of type Vec < Child >
.
By default, this method calls [Vec < Child >::visit_mut_children_with
]. If you want to recurse, you need to call it manually.
sourcefn visit_mut_comment(&mut self, node: &mut Comment)
fn visit_mut_comment(&mut self, node: &mut Comment)
Visit a node of type Comment
.
By default, this method calls [Comment::visit_mut_children_with
]. If you want to recurse, you need to call it manually.
sourcefn visit_mut_document(&mut self, node: &mut Document)
fn visit_mut_document(&mut self, node: &mut Document)
Visit a node of type Document
.
By default, this method calls [Document::visit_mut_children_with
]. If you want to recurse, you need to call it manually.
sourcefn visit_mut_document_mode(&mut self, node: &mut DocumentMode)
fn visit_mut_document_mode(&mut self, node: &mut DocumentMode)
Visit a node of type DocumentMode
.
By default, this method calls [DocumentMode::visit_mut_children_with
]. If you want to recurse, you need to call it manually.
sourcefn visit_mut_document_type(&mut self, node: &mut DocumentType)
fn visit_mut_document_type(&mut self, node: &mut DocumentType)
Visit a node of type DocumentType
.
By default, this method calls [DocumentType::visit_mut_children_with
]. If you want to recurse, you need to call it manually.
sourcefn visit_mut_element(&mut self, node: &mut Element)
fn visit_mut_element(&mut self, node: &mut Element)
Visit a node of type Element
.
By default, this method calls [Element::visit_mut_children_with
]. If you want to recurse, you need to call it manually.
sourcefn visit_mut_namespace(&mut self, node: &mut Namespace)
fn visit_mut_namespace(&mut self, node: &mut Namespace)
Visit a node of type Namespace
.
By default, this method calls [Namespace::visit_mut_children_with
]. If you want to recurse, you need to call it manually.
sourcefn visit_mut_opt_atom(&mut self, node: &mut Option<Atom>)
fn visit_mut_opt_atom(&mut self, node: &mut Option<Atom>)
Visit a node of type Option < swc_atoms :: Atom >
.
By default, this method calls [Option < swc_atoms :: Atom >::visit_mut_children_with
]. If you want to recurse, you need to call it manually.
sourcefn visit_mut_opt_namespace(&mut self, node: &mut Option<Namespace>)
fn visit_mut_opt_namespace(&mut self, node: &mut Option<Namespace>)
Visit a node of type Option < Namespace >
.
By default, this method calls [Option < Namespace >::visit_mut_children_with
]. If you want to recurse, you need to call it manually.
sourcefn visit_mut_processing_instruction(&mut self, node: &mut ProcessingInstruction)
fn visit_mut_processing_instruction(&mut self, node: &mut ProcessingInstruction)
Visit a node of type ProcessingInstruction
.
By default, this method calls [ProcessingInstruction::visit_mut_children_with
]. If you want to recurse, you need to call it manually.
sourcefn visit_mut_span(&mut self, node: &mut Span)
fn visit_mut_span(&mut self, node: &mut Span)
Visit a node of type swc_common :: Span
.
By default, this method calls [swc_common :: Span::visit_mut_children_with
]. If you want to recurse, you need to call it manually.
sourcefn visit_mut_text(&mut self, node: &mut Text)
fn visit_mut_text(&mut self, node: &mut Text)
Visit a node of type Text
.
By default, this method calls [Text::visit_mut_children_with
]. If you want to recurse, you need to call it manually.
sourcefn visit_mut_token(&mut self, node: &mut Token)
fn visit_mut_token(&mut self, node: &mut Token)
Visit a node of type Token
.
By default, this method calls [Token::visit_mut_children_with
]. If you want to recurse, you need to call it manually.
sourcefn visit_mut_token_and_span(&mut self, node: &mut TokenAndSpan)
fn visit_mut_token_and_span(&mut self, node: &mut TokenAndSpan)
Visit a node of type TokenAndSpan
.
By default, this method calls [TokenAndSpan::visit_mut_children_with
]. If you want to recurse, you need to call it manually.