Trait swc_html_visit::Fold

source ·
pub trait Fold {
Show 17 methods // Provided methods fn fold_atom(&mut self, n: Atom) -> Atom { ... } fn fold_attribute(&mut self, n: Attribute) -> Attribute { ... } fn fold_attributes(&mut self, n: Vec<Attribute>) -> Vec<Attribute> { ... } fn fold_child(&mut self, n: Child) -> Child { ... } fn fold_children(&mut self, n: Vec<Child>) -> Vec<Child> { ... } fn fold_comment(&mut self, n: Comment) -> Comment { ... } fn fold_document(&mut self, n: Document) -> Document { ... } fn fold_document_fragment( &mut self, n: DocumentFragment ) -> DocumentFragment { ... } fn fold_document_mode(&mut self, n: DocumentMode) -> DocumentMode { ... } fn fold_document_type(&mut self, n: DocumentType) -> DocumentType { ... } fn fold_element(&mut self, n: Element) -> Element { ... } fn fold_namespace(&mut self, n: Namespace) -> Namespace { ... } fn fold_opt_atom(&mut self, n: Option<Atom>) -> Option<Atom> { ... } fn fold_opt_document_fragment( &mut self, n: Option<DocumentFragment> ) -> Option<DocumentFragment> { ... } fn fold_opt_namespace(&mut self, n: Option<Namespace>) -> Option<Namespace> { ... } fn fold_span(&mut self, n: Span) -> Span { ... } fn fold_text(&mut self, n: Text) -> Text { ... }
}

Provided Methods§

source

fn fold_atom(&mut self, n: Atom) -> Atom

source

fn fold_attribute(&mut self, n: Attribute) -> Attribute

This method can be overridden to customize the visitor behavior.

This calls FoldWith::fold_children_with on n by default. The default method visit children nodes with self.

source

fn fold_attributes(&mut self, n: Vec<Attribute>) -> Vec<Attribute>

source

fn fold_child(&mut self, n: Child) -> Child

This method can be overridden to customize the visitor behavior.

This calls FoldWith::fold_children_with on n by default. The default method visit children nodes with self.

source

fn fold_children(&mut self, n: Vec<Child>) -> Vec<Child>

source

fn fold_comment(&mut self, n: Comment) -> Comment

This method can be overridden to customize the visitor behavior.

This calls FoldWith::fold_children_with on n by default. The default method visit children nodes with self.

source

fn fold_document(&mut self, n: Document) -> Document

This method can be overridden to customize the visitor behavior.

This calls FoldWith::fold_children_with on n by default. The default method visit children nodes with self.

source

fn fold_document_fragment(&mut self, n: DocumentFragment) -> DocumentFragment

This method can be overridden to customize the visitor behavior.

This calls FoldWith::fold_children_with on n by default. The default method visit children nodes with self.

source

fn fold_document_mode(&mut self, n: DocumentMode) -> DocumentMode

This method can be overridden to customize the visitor behavior.

This calls FoldWith::fold_children_with on n by default. The default method visit children nodes with self.

source

fn fold_document_type(&mut self, n: DocumentType) -> DocumentType

This method can be overridden to customize the visitor behavior.

This calls FoldWith::fold_children_with on n by default. The default method visit children nodes with self.

source

fn fold_element(&mut self, n: Element) -> Element

This method can be overridden to customize the visitor behavior.

This calls FoldWith::fold_children_with on n by default. The default method visit children nodes with self.

source

fn fold_namespace(&mut self, n: Namespace) -> Namespace

This method can be overridden to customize the visitor behavior.

This calls FoldWith::fold_children_with on n by default. The default method visit children nodes with self.

source

fn fold_opt_atom(&mut self, n: Option<Atom>) -> Option<Atom>

source

fn fold_opt_document_fragment( &mut self, n: Option<DocumentFragment> ) -> Option<DocumentFragment>

source

fn fold_opt_namespace(&mut self, n: Option<Namespace>) -> Option<Namespace>

source

fn fold_span(&mut self, n: Span) -> Span

source

fn fold_text(&mut self, n: Text) -> Text

This method can be overridden to customize the visitor behavior.

This calls FoldWith::fold_children_with on n by default. The default method visit children nodes with self.

Implementations on Foreign Types§

source§

impl<'a, V> Fold for &'a mut V
where V: ?Sized + Fold,

source§

fn fold_atom(&mut self, n: Atom) -> Atom

source§

fn fold_attribute(&mut self, n: Attribute) -> Attribute

source§

fn fold_attributes(&mut self, n: Vec<Attribute>) -> Vec<Attribute>

source§

fn fold_child(&mut self, n: Child) -> Child

source§

fn fold_children(&mut self, n: Vec<Child>) -> Vec<Child>

source§

fn fold_comment(&mut self, n: Comment) -> Comment

source§

fn fold_document(&mut self, n: Document) -> Document

source§

fn fold_document_fragment(&mut self, n: DocumentFragment) -> DocumentFragment

source§

fn fold_document_mode(&mut self, n: DocumentMode) -> DocumentMode

source§

fn fold_document_type(&mut self, n: DocumentType) -> DocumentType

source§

fn fold_element(&mut self, n: Element) -> Element

source§

fn fold_namespace(&mut self, n: Namespace) -> Namespace

source§

fn fold_opt_atom(&mut self, n: Option<Atom>) -> Option<Atom>

source§

fn fold_opt_document_fragment( &mut self, n: Option<DocumentFragment> ) -> Option<DocumentFragment>

source§

fn fold_opt_namespace(&mut self, n: Option<Namespace>) -> Option<Namespace>

source§

fn fold_span(&mut self, n: Span) -> Span

source§

fn fold_text(&mut self, n: Text) -> Text

source§

impl<A, B> Fold for Either<A, B>
where A: Fold, B: Fold,

source§

fn fold_atom(&mut self, n: Atom) -> Atom

source§

fn fold_attribute(&mut self, n: Attribute) -> Attribute

source§

fn fold_attributes(&mut self, n: Vec<Attribute>) -> Vec<Attribute>

source§

fn fold_child(&mut self, n: Child) -> Child

source§

fn fold_children(&mut self, n: Vec<Child>) -> Vec<Child>

source§

fn fold_comment(&mut self, n: Comment) -> Comment

source§

fn fold_document(&mut self, n: Document) -> Document

source§

fn fold_document_fragment(&mut self, n: DocumentFragment) -> DocumentFragment

source§

fn fold_document_mode(&mut self, n: DocumentMode) -> DocumentMode

source§

fn fold_document_type(&mut self, n: DocumentType) -> DocumentType

source§

fn fold_element(&mut self, n: Element) -> Element

source§

fn fold_namespace(&mut self, n: Namespace) -> Namespace

source§

fn fold_opt_atom(&mut self, n: Option<Atom>) -> Option<Atom>

source§

fn fold_opt_document_fragment( &mut self, n: Option<DocumentFragment> ) -> Option<DocumentFragment>

source§

fn fold_opt_namespace(&mut self, n: Option<Namespace>) -> Option<Namespace>

source§

fn fold_span(&mut self, n: Span) -> Span

source§

fn fold_text(&mut self, n: Text) -> Text

source§

impl<V> Fold for Box<V>
where V: ?Sized + Fold,

source§

fn fold_atom(&mut self, n: Atom) -> Atom

source§

fn fold_attribute(&mut self, n: Attribute) -> Attribute

source§

fn fold_attributes(&mut self, n: Vec<Attribute>) -> Vec<Attribute>

source§

fn fold_child(&mut self, n: Child) -> Child

source§

fn fold_children(&mut self, n: Vec<Child>) -> Vec<Child>

source§

fn fold_comment(&mut self, n: Comment) -> Comment

source§

fn fold_document(&mut self, n: Document) -> Document

source§

fn fold_document_fragment(&mut self, n: DocumentFragment) -> DocumentFragment

source§

fn fold_document_mode(&mut self, n: DocumentMode) -> DocumentMode

source§

fn fold_document_type(&mut self, n: DocumentType) -> DocumentType

source§

fn fold_element(&mut self, n: Element) -> Element

source§

fn fold_namespace(&mut self, n: Namespace) -> Namespace

source§

fn fold_opt_atom(&mut self, n: Option<Atom>) -> Option<Atom>

source§

fn fold_opt_document_fragment( &mut self, n: Option<DocumentFragment> ) -> Option<DocumentFragment>

source§

fn fold_opt_namespace(&mut self, n: Option<Namespace>) -> Option<Namespace>

source§

fn fold_span(&mut self, n: Span) -> Span

source§

fn fold_text(&mut self, n: Text) -> Text

source§

impl<V> Fold for Optional<V>
where V: Fold,

source§

fn fold_atom(&mut self, n: Atom) -> Atom

source§

fn fold_attribute(&mut self, n: Attribute) -> Attribute

source§

fn fold_attributes(&mut self, n: Vec<Attribute>) -> Vec<Attribute>

source§

fn fold_child(&mut self, n: Child) -> Child

source§

fn fold_children(&mut self, n: Vec<Child>) -> Vec<Child>

source§

fn fold_comment(&mut self, n: Comment) -> Comment

source§

fn fold_document(&mut self, n: Document) -> Document

source§

fn fold_document_fragment(&mut self, n: DocumentFragment) -> DocumentFragment

source§

fn fold_document_mode(&mut self, n: DocumentMode) -> DocumentMode

source§

fn fold_document_type(&mut self, n: DocumentType) -> DocumentType

source§

fn fold_element(&mut self, n: Element) -> Element

source§

fn fold_namespace(&mut self, n: Namespace) -> Namespace

source§

fn fold_opt_atom(&mut self, n: Option<Atom>) -> Option<Atom>

source§

fn fold_opt_document_fragment( &mut self, n: Option<DocumentFragment> ) -> Option<DocumentFragment>

source§

fn fold_opt_namespace(&mut self, n: Option<Namespace>) -> Option<Namespace>

source§

fn fold_span(&mut self, n: Span) -> Span

source§

fn fold_text(&mut self, n: Text) -> Text

Implementors§