Trait swc_html_visit::FoldAstPath
source · [−]pub trait FoldAstPath {
Show 17 methods
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>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
{ ... }
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>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
{ ... }
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_js_word(&mut self, n: JsWord, __ast_path: &mut AstKindPath) -> JsWord { ... }
fn fold_namespace(
&mut self,
n: Namespace,
__ast_path: &mut AstKindPath
) -> Namespace { ... }
fn fold_opt_document_fragment(
&mut self,
n: Option<DocumentFragment>,
__ast_path: &mut AstKindPath
) -> Option<DocumentFragment> { ... }
fn fold_opt_js_word(
&mut self,
n: Option<JsWord>,
__ast_path: &mut AstKindPath
) -> Option<JsWord> { ... }
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_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 overriden 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>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
fn 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 overriden 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>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
fn 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 overriden 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_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 overriden 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_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 overriden 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_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 overriden 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_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 overriden 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_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 overriden 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_js_word(&mut self, n: JsWord, __ast_path: &mut AstKindPath) -> JsWord
fn 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 overriden 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_document_fragment(
&mut self,
n: Option<DocumentFragment>,
__ast_path: &mut AstKindPath
) -> Option<DocumentFragment>
fn fold_opt_js_word(
&mut self,
n: Option<JsWord>,
__ast_path: &mut AstKindPath
) -> Option<JsWord>
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
fn fold_text(&mut self, n: Text, __ast_path: &mut AstKindPath) -> Text
This method can be overriden to customize the visitor behavior.
This calls FoldWithPath::fold_children_with_path
on n
by default. The default method visit children nodes with self
.
Implementations on Foreign Types
sourceimpl<'a, V> FoldAstPath for &'a mut V where
V: ?Sized + FoldAstPath,
impl<'a, V> FoldAstPath for &'a mut V where
V: ?Sized + FoldAstPath,
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>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
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>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
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_js_word(&mut self, n: JsWord, __ast_path: &mut AstKindPath) -> JsWord
fn fold_namespace(
&mut self,
n: Namespace,
__ast_path: &mut AstKindPath
) -> Namespace
fn fold_opt_document_fragment(
&mut self,
n: Option<DocumentFragment>,
__ast_path: &mut AstKindPath
) -> Option<DocumentFragment>
fn fold_opt_js_word(
&mut self,
n: Option<JsWord>,
__ast_path: &mut AstKindPath
) -> Option<JsWord>
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
sourceimpl<V> FoldAstPath for Box<V> where
V: ?Sized + FoldAstPath,
impl<V> FoldAstPath for Box<V> where
V: ?Sized + FoldAstPath,
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>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
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>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
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_js_word(&mut self, n: JsWord, __ast_path: &mut AstKindPath) -> JsWord
fn fold_namespace(
&mut self,
n: Namespace,
__ast_path: &mut AstKindPath
) -> Namespace
fn fold_opt_document_fragment(
&mut self,
n: Option<DocumentFragment>,
__ast_path: &mut AstKindPath
) -> Option<DocumentFragment>
fn fold_opt_js_word(
&mut self,
n: Option<JsWord>,
__ast_path: &mut AstKindPath
) -> Option<JsWord>
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
sourceimpl<V> FoldAstPath for Optional<V> where
V: FoldAstPath,
impl<V> FoldAstPath for Optional<V> where
V: FoldAstPath,
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>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
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>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
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_js_word(&mut self, n: JsWord, __ast_path: &mut AstKindPath) -> JsWord
fn fold_namespace(
&mut self,
n: Namespace,
__ast_path: &mut AstKindPath
) -> Namespace
fn fold_opt_document_fragment(
&mut self,
n: Option<DocumentFragment>,
__ast_path: &mut AstKindPath
) -> Option<DocumentFragment>
fn fold_opt_js_word(
&mut self,
n: Option<JsWord>,
__ast_path: &mut AstKindPath
) -> Option<JsWord>
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
sourceimpl<A, B> FoldAstPath for Either<A, B> where
A: FoldAstPath,
B: FoldAstPath,
impl<A, B> FoldAstPath for Either<A, B> where
A: FoldAstPath,
B: FoldAstPath,
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>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
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>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,