Trait swc_html_visit::FoldAstPath
source · pub trait FoldAstPath {
Show 17 methods
// Provided methods
fn fold_atom(&mut self, n: Atom, __ast_path: &mut AstKindPath) -> Atom { ... }
fn fold_attribute(
&mut self,
n: Attribute,
__ast_path: &mut AstKindPath
) -> Attribute { ... }
fn fold_attributes(
&mut self,
n: Vec<Attribute>,
__ast_path: &mut AstKindPath
) -> Vec<Attribute> { ... }
fn fold_child(&mut self, n: Child, __ast_path: &mut AstKindPath) -> Child { ... }
fn fold_children(
&mut self,
n: Vec<Child>,
__ast_path: &mut AstKindPath
) -> Vec<Child> { ... }
fn fold_comment(
&mut self,
n: Comment,
__ast_path: &mut AstKindPath
) -> Comment { ... }
fn fold_document(
&mut self,
n: Document,
__ast_path: &mut AstKindPath
) -> Document { ... }
fn fold_document_fragment(
&mut self,
n: DocumentFragment,
__ast_path: &mut AstKindPath
) -> DocumentFragment { ... }
fn fold_document_mode(
&mut self,
n: DocumentMode,
__ast_path: &mut AstKindPath
) -> DocumentMode { ... }
fn fold_document_type(
&mut self,
n: DocumentType,
__ast_path: &mut AstKindPath
) -> DocumentType { ... }
fn fold_element(
&mut self,
n: Element,
__ast_path: &mut AstKindPath
) -> Element { ... }
fn fold_namespace(
&mut self,
n: Namespace,
__ast_path: &mut AstKindPath
) -> Namespace { ... }
fn fold_opt_atom(
&mut self,
n: Option<Atom>,
__ast_path: &mut AstKindPath
) -> Option<Atom> { ... }
fn fold_opt_document_fragment(
&mut self,
n: Option<DocumentFragment>,
__ast_path: &mut AstKindPath
) -> Option<DocumentFragment> { ... }
fn fold_opt_namespace(
&mut self,
n: Option<Namespace>,
__ast_path: &mut AstKindPath
) -> Option<Namespace> { ... }
fn fold_span(&mut self, n: Span, __ast_path: &mut AstKindPath) -> Span { ... }
fn fold_text(&mut self, n: Text, __ast_path: &mut AstKindPath) -> Text { ... }
}
path
only.Provided Methods§
fn fold_atom(&mut self, n: Atom, __ast_path: &mut AstKindPath) -> Atom
sourcefn fold_attribute(
&mut self,
n: Attribute,
__ast_path: &mut AstKindPath
) -> Attribute
fn fold_attribute( &mut self, n: Attribute, __ast_path: &mut AstKindPath ) -> Attribute
This method can be overridden to customize the visitor behavior.
This calls FoldWithPath::fold_children_with_path
on n
by default. The default method visit children nodes with self
.
fn fold_attributes( &mut self, n: Vec<Attribute>, __ast_path: &mut AstKindPath ) -> Vec<Attribute>
sourcefn fold_child(&mut self, n: Child, __ast_path: &mut AstKindPath) -> Child
fn fold_child(&mut self, n: Child, __ast_path: &mut AstKindPath) -> Child
This method can be overridden to customize the visitor behavior.
This calls FoldWithPath::fold_children_with_path
on n
by default. The default method visit children nodes with self
.
fn fold_children( &mut self, n: Vec<Child>, __ast_path: &mut AstKindPath ) -> Vec<Child>
sourcefn fold_comment(&mut self, n: Comment, __ast_path: &mut AstKindPath) -> Comment
fn fold_comment(&mut self, n: Comment, __ast_path: &mut AstKindPath) -> Comment
This method can be overridden to customize the visitor behavior.
This calls FoldWithPath::fold_children_with_path
on n
by default. The default method visit children nodes with self
.
sourcefn fold_document(
&mut self,
n: Document,
__ast_path: &mut AstKindPath
) -> Document
fn fold_document( &mut self, n: Document, __ast_path: &mut AstKindPath ) -> Document
This method can be overridden to customize the visitor behavior.
This calls FoldWithPath::fold_children_with_path
on n
by default. The default method visit children nodes with self
.
sourcefn fold_document_fragment(
&mut self,
n: DocumentFragment,
__ast_path: &mut AstKindPath
) -> DocumentFragment
fn fold_document_fragment( &mut self, n: DocumentFragment, __ast_path: &mut AstKindPath ) -> DocumentFragment
This method can be overridden to customize the visitor behavior.
This calls FoldWithPath::fold_children_with_path
on n
by default. The default method visit children nodes with self
.
sourcefn fold_document_mode(
&mut self,
n: DocumentMode,
__ast_path: &mut AstKindPath
) -> DocumentMode
fn fold_document_mode( &mut self, n: DocumentMode, __ast_path: &mut AstKindPath ) -> DocumentMode
This method can be overridden to customize the visitor behavior.
This calls FoldWithPath::fold_children_with_path
on n
by default. The default method visit children nodes with self
.
sourcefn fold_document_type(
&mut self,
n: DocumentType,
__ast_path: &mut AstKindPath
) -> DocumentType
fn fold_document_type( &mut self, n: DocumentType, __ast_path: &mut AstKindPath ) -> DocumentType
This method can be overridden to customize the visitor behavior.
This calls FoldWithPath::fold_children_with_path
on n
by default. The default method visit children nodes with self
.
sourcefn fold_element(&mut self, n: Element, __ast_path: &mut AstKindPath) -> Element
fn fold_element(&mut self, n: Element, __ast_path: &mut AstKindPath) -> Element
This method can be overridden to customize the visitor behavior.
This calls FoldWithPath::fold_children_with_path
on n
by default. The default method visit children nodes with self
.
sourcefn fold_namespace(
&mut self,
n: Namespace,
__ast_path: &mut AstKindPath
) -> Namespace
fn fold_namespace( &mut self, n: Namespace, __ast_path: &mut AstKindPath ) -> Namespace
This method can be overridden to customize the visitor behavior.
This calls FoldWithPath::fold_children_with_path
on n
by default. The default method visit children nodes with self
.
fn fold_opt_atom( &mut self, n: Option<Atom>, __ast_path: &mut AstKindPath ) -> Option<Atom>
fn fold_opt_document_fragment( &mut self, n: Option<DocumentFragment>, __ast_path: &mut AstKindPath ) -> Option<DocumentFragment>
fn fold_opt_namespace( &mut self, n: Option<Namespace>, __ast_path: &mut AstKindPath ) -> Option<Namespace>
fn fold_span(&mut self, n: Span, __ast_path: &mut AstKindPath) -> Span
sourcefn fold_text(&mut self, n: Text, __ast_path: &mut AstKindPath) -> Text
fn fold_text(&mut self, n: Text, __ast_path: &mut AstKindPath) -> Text
This method can be overridden to customize the visitor behavior.
This calls FoldWithPath::fold_children_with_path
on n
by default. The default method visit children nodes with self
.