swc_html_visit

Trait Visit

source
pub trait Visit {
Show 23 methods // Provided methods fn visit_atom(&mut self, node: &Atom) { ... } fn visit_attribute(&mut self, node: &Attribute) { ... } fn visit_attribute_token(&mut self, node: &AttributeToken) { ... } fn visit_attribute_tokens(&mut self, node: &[AttributeToken]) { ... } fn visit_attributes(&mut self, node: &[Attribute]) { ... } fn visit_child(&mut self, node: &Child) { ... } fn visit_childs(&mut self, node: &[Child]) { ... } fn visit_comment(&mut self, node: &Comment) { ... } fn visit_document(&mut self, node: &Document) { ... } fn visit_document_fragment(&mut self, node: &DocumentFragment) { ... } fn visit_document_mode(&mut self, node: &DocumentMode) { ... } fn visit_document_type(&mut self, node: &DocumentType) { ... } fn visit_element(&mut self, node: &Element) { ... } fn visit_namespace(&mut self, node: &Namespace) { ... } fn visit_opt_atom(&mut self, node: &Option<Atom>) { ... } fn visit_opt_document_fragment(&mut self, node: &Option<DocumentFragment>) { ... } fn visit_opt_namespace(&mut self, node: &Option<Namespace>) { ... } fn visit_opt_raw(&mut self, node: &Option<Raw>) { ... } fn visit_raw(&mut self, node: &Raw) { ... } fn visit_span(&mut self, node: &Span) { ... } fn visit_text(&mut self, node: &Text) { ... } fn visit_token(&mut self, node: &Token) { ... } fn visit_token_and_span(&mut self, node: &TokenAndSpan) { ... }
}
Expand description

A visitor trait for traversing the AST.

Provided Methods§

source

fn visit_atom(&mut self, node: &Atom)

Visit a node of type swc_atoms :: Atom.

By default, this method calls [swc_atoms :: Atom::visit_children_with]. If you want to recurse, you need to call it manually.

source

fn visit_attribute(&mut self, node: &Attribute)

Visit a node of type Attribute.

By default, this method calls [Attribute::visit_children_with]. If you want to recurse, you need to call it manually.

source

fn visit_attribute_token(&mut self, node: &AttributeToken)

Visit a node of type AttributeToken.

By default, this method calls [AttributeToken::visit_children_with]. If you want to recurse, you need to call it manually.

source

fn visit_attribute_tokens(&mut self, node: &[AttributeToken])

Visit a node of type Vec < AttributeToken >.

By default, this method calls [Vec < AttributeToken >::visit_children_with]. If you want to recurse, you need to call it manually.

source

fn visit_attributes(&mut self, node: &[Attribute])

Visit a node of type Vec < Attribute >.

By default, this method calls [Vec < Attribute >::visit_children_with]. If you want to recurse, you need to call it manually.

source

fn visit_child(&mut self, node: &Child)

Visit a node of type Child.

By default, this method calls [Child::visit_children_with]. If you want to recurse, you need to call it manually.

source

fn visit_childs(&mut self, node: &[Child])

Visit a node of type Vec < Child >.

By default, this method calls [Vec < Child >::visit_children_with]. If you want to recurse, you need to call it manually.

source

fn visit_comment(&mut self, node: &Comment)

Visit a node of type Comment.

By default, this method calls [Comment::visit_children_with]. If you want to recurse, you need to call it manually.

source

fn visit_document(&mut self, node: &Document)

Visit a node of type Document.

By default, this method calls [Document::visit_children_with]. If you want to recurse, you need to call it manually.

source

fn visit_document_fragment(&mut self, node: &DocumentFragment)

Visit a node of type DocumentFragment.

By default, this method calls [DocumentFragment::visit_children_with]. If you want to recurse, you need to call it manually.

source

fn visit_document_mode(&mut self, node: &DocumentMode)

Visit a node of type DocumentMode.

By default, this method calls [DocumentMode::visit_children_with]. If you want to recurse, you need to call it manually.

source

fn visit_document_type(&mut self, node: &DocumentType)

Visit a node of type DocumentType.

By default, this method calls [DocumentType::visit_children_with]. If you want to recurse, you need to call it manually.

source

fn visit_element(&mut self, node: &Element)

Visit a node of type Element.

By default, this method calls [Element::visit_children_with]. If you want to recurse, you need to call it manually.

source

fn visit_namespace(&mut self, node: &Namespace)

Visit a node of type Namespace.

By default, this method calls [Namespace::visit_children_with]. If you want to recurse, you need to call it manually.

source

fn visit_opt_atom(&mut self, node: &Option<Atom>)

Visit a node of type Option < swc_atoms :: Atom >.

By default, this method calls [Option < swc_atoms :: Atom >::visit_children_with]. If you want to recurse, you need to call it manually.

source

fn visit_opt_document_fragment(&mut self, node: &Option<DocumentFragment>)

Visit a node of type Option < DocumentFragment >.

By default, this method calls [Option < DocumentFragment >::visit_children_with]. If you want to recurse, you need to call it manually.

source

fn visit_opt_namespace(&mut self, node: &Option<Namespace>)

Visit a node of type Option < Namespace >.

By default, this method calls [Option < Namespace >::visit_children_with]. If you want to recurse, you need to call it manually.

source

fn visit_opt_raw(&mut self, node: &Option<Raw>)

Visit a node of type Option < Raw >.

By default, this method calls [Option < Raw >::visit_children_with]. If you want to recurse, you need to call it manually.

source

fn visit_raw(&mut self, node: &Raw)

Visit a node of type Raw.

By default, this method calls [Raw::visit_children_with]. If you want to recurse, you need to call it manually.

source

fn visit_span(&mut self, node: &Span)

Visit a node of type swc_common :: Span.

By default, this method calls [swc_common :: Span::visit_children_with]. If you want to recurse, you need to call it manually.

source

fn visit_text(&mut self, node: &Text)

Visit a node of type Text.

By default, this method calls [Text::visit_children_with]. If you want to recurse, you need to call it manually.

source

fn visit_token(&mut self, node: &Token)

Visit a node of type Token.

By default, this method calls [Token::visit_children_with]. If you want to recurse, you need to call it manually.

source

fn visit_token_and_span(&mut self, node: &TokenAndSpan)

Visit a node of type TokenAndSpan.

By default, this method calls [TokenAndSpan::visit_children_with]. If you want to recurse, you need to call it manually.

Implementations on Foreign Types§

source§

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

source§

fn visit_atom(&mut self, node: &Atom)

source§

fn visit_attribute(&mut self, node: &Attribute)

source§

fn visit_attribute_token(&mut self, node: &AttributeToken)

source§

fn visit_attribute_tokens(&mut self, node: &[AttributeToken])

source§

fn visit_attributes(&mut self, node: &[Attribute])

source§

fn visit_child(&mut self, node: &Child)

source§

fn visit_childs(&mut self, node: &[Child])

source§

fn visit_comment(&mut self, node: &Comment)

source§

fn visit_document(&mut self, node: &Document)

source§

fn visit_document_fragment(&mut self, node: &DocumentFragment)

source§

fn visit_document_mode(&mut self, node: &DocumentMode)

source§

fn visit_document_type(&mut self, node: &DocumentType)

source§

fn visit_element(&mut self, node: &Element)

source§

fn visit_namespace(&mut self, node: &Namespace)

source§

fn visit_opt_atom(&mut self, node: &Option<Atom>)

source§

fn visit_opt_document_fragment(&mut self, node: &Option<DocumentFragment>)

source§

fn visit_opt_namespace(&mut self, node: &Option<Namespace>)

source§

fn visit_opt_raw(&mut self, node: &Option<Raw>)

source§

fn visit_raw(&mut self, node: &Raw)

source§

fn visit_span(&mut self, node: &Span)

source§

fn visit_text(&mut self, node: &Text)

source§

fn visit_token(&mut self, node: &Token)

source§

fn visit_token_and_span(&mut self, node: &TokenAndSpan)

source§

impl<V> Visit for &mut V
where V: ?Sized + Visit,

source§

fn visit_atom(&mut self, node: &Atom)

source§

fn visit_attribute(&mut self, node: &Attribute)

source§

fn visit_attribute_token(&mut self, node: &AttributeToken)

source§

fn visit_attribute_tokens(&mut self, node: &[AttributeToken])

source§

fn visit_attributes(&mut self, node: &[Attribute])

source§

fn visit_child(&mut self, node: &Child)

source§

fn visit_childs(&mut self, node: &[Child])

source§

fn visit_comment(&mut self, node: &Comment)

source§

fn visit_document(&mut self, node: &Document)

source§

fn visit_document_fragment(&mut self, node: &DocumentFragment)

source§

fn visit_document_mode(&mut self, node: &DocumentMode)

source§

fn visit_document_type(&mut self, node: &DocumentType)

source§

fn visit_element(&mut self, node: &Element)

source§

fn visit_namespace(&mut self, node: &Namespace)

source§

fn visit_opt_atom(&mut self, node: &Option<Atom>)

source§

fn visit_opt_document_fragment(&mut self, node: &Option<DocumentFragment>)

source§

fn visit_opt_namespace(&mut self, node: &Option<Namespace>)

source§

fn visit_opt_raw(&mut self, node: &Option<Raw>)

source§

fn visit_raw(&mut self, node: &Raw)

source§

fn visit_span(&mut self, node: &Span)

source§

fn visit_text(&mut self, node: &Text)

source§

fn visit_token(&mut self, node: &Token)

source§

fn visit_token_and_span(&mut self, node: &TokenAndSpan)

source§

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

source§

fn visit_atom(&mut self, node: &Atom)

source§

fn visit_attribute(&mut self, node: &Attribute)

source§

fn visit_attribute_token(&mut self, node: &AttributeToken)

source§

fn visit_attribute_tokens(&mut self, node: &[AttributeToken])

source§

fn visit_attributes(&mut self, node: &[Attribute])

source§

fn visit_child(&mut self, node: &Child)

source§

fn visit_childs(&mut self, node: &[Child])

source§

fn visit_comment(&mut self, node: &Comment)

source§

fn visit_document(&mut self, node: &Document)

source§

fn visit_document_fragment(&mut self, node: &DocumentFragment)

source§

fn visit_document_mode(&mut self, node: &DocumentMode)

source§

fn visit_document_type(&mut self, node: &DocumentType)

source§

fn visit_element(&mut self, node: &Element)

source§

fn visit_namespace(&mut self, node: &Namespace)

source§

fn visit_opt_atom(&mut self, node: &Option<Atom>)

source§

fn visit_opt_document_fragment(&mut self, node: &Option<DocumentFragment>)

source§

fn visit_opt_namespace(&mut self, node: &Option<Namespace>)

source§

fn visit_opt_raw(&mut self, node: &Option<Raw>)

source§

fn visit_raw(&mut self, node: &Raw)

source§

fn visit_span(&mut self, node: &Span)

source§

fn visit_text(&mut self, node: &Text)

source§

fn visit_token(&mut self, node: &Token)

source§

fn visit_token_and_span(&mut self, node: &TokenAndSpan)

source§

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

source§

fn visit_atom(&mut self, node: &Atom)

source§

fn visit_attribute(&mut self, node: &Attribute)

source§

fn visit_attribute_token(&mut self, node: &AttributeToken)

source§

fn visit_attribute_tokens(&mut self, node: &[AttributeToken])

source§

fn visit_attributes(&mut self, node: &[Attribute])

source§

fn visit_child(&mut self, node: &Child)

source§

fn visit_childs(&mut self, node: &[Child])

source§

fn visit_comment(&mut self, node: &Comment)

source§

fn visit_document(&mut self, node: &Document)

source§

fn visit_document_fragment(&mut self, node: &DocumentFragment)

source§

fn visit_document_mode(&mut self, node: &DocumentMode)

source§

fn visit_document_type(&mut self, node: &DocumentType)

source§

fn visit_element(&mut self, node: &Element)

source§

fn visit_namespace(&mut self, node: &Namespace)

source§

fn visit_opt_atom(&mut self, node: &Option<Atom>)

source§

fn visit_opt_document_fragment(&mut self, node: &Option<DocumentFragment>)

source§

fn visit_opt_namespace(&mut self, node: &Option<Namespace>)

source§

fn visit_opt_raw(&mut self, node: &Option<Raw>)

source§

fn visit_raw(&mut self, node: &Raw)

source§

fn visit_span(&mut self, node: &Span)

source§

fn visit_text(&mut self, node: &Text)

source§

fn visit_token(&mut self, node: &Token)

source§

fn visit_token_and_span(&mut self, node: &TokenAndSpan)

Implementors§