Trait swc_html_visit::FoldWith

source ·
pub trait FoldWith<V: ?Sized + Fold> {
    // Required methods
    fn fold_with(self, v: &mut V) -> Self;
    fn fold_children_with(self, v: &mut V) -> Self;
}
Expand description

A utility trait implemented for ast nodes, and allow to visit them with a visitor.

Required Methods§

source

fn fold_with(self, v: &mut V) -> Self

Calls a visitor method (v.fold_xxx) with self.

source

fn fold_children_with(self, v: &mut V) -> Self

Visit children nodes of self with v

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<V, T> FoldWith<V> for Box<T>
where V: ?Sized + Fold, T: 'static + FoldWith<V>,

source§

fn fold_children_with(self, v: &mut V) -> Self

Visit children nodes of self with v

source§

fn fold_with(self, v: &mut V) -> Self

source§

impl<V: ?Sized + Fold> FoldWith<V> for Option<Atom>

source§

fn fold_with(self, v: &mut V) -> Self

source§

fn fold_children_with(self, v: &mut V) -> Self

source§

impl<V: ?Sized + Fold> FoldWith<V> for Option<DocumentFragment>

source§

fn fold_with(self, v: &mut V) -> Self

source§

fn fold_children_with(self, v: &mut V) -> Self

source§

impl<V: ?Sized + Fold> FoldWith<V> for Option<Namespace>

source§

fn fold_with(self, v: &mut V) -> Self

source§

fn fold_children_with(self, v: &mut V) -> Self

source§

impl<V: ?Sized + Fold> FoldWith<V> for Vec<Attribute>

source§

fn fold_with(self, v: &mut V) -> Self

source§

fn fold_children_with(self, v: &mut V) -> Self

source§

impl<V: ?Sized + Fold> FoldWith<V> for Vec<Child>

source§

fn fold_with(self, v: &mut V) -> Self

source§

fn fold_children_with(self, v: &mut V) -> Self

source§

impl<V: ?Sized + Fold> FoldWith<V> for Atom

source§

fn fold_with(self, v: &mut V) -> Self

source§

fn fold_children_with(self, v: &mut V) -> Self

source§

impl<V: ?Sized + Fold> FoldWith<V> for Attribute

source§

fn fold_with(self, v: &mut V) -> Self

source§

fn fold_children_with(self, v: &mut V) -> Self

source§

impl<V: ?Sized + Fold> FoldWith<V> for Child

source§

fn fold_with(self, v: &mut V) -> Self

source§

fn fold_children_with(self, v: &mut V) -> Self

source§

impl<V: ?Sized + Fold> FoldWith<V> for Comment

source§

fn fold_with(self, v: &mut V) -> Self

source§

fn fold_children_with(self, v: &mut V) -> Self

source§

impl<V: ?Sized + Fold> FoldWith<V> for Document

source§

fn fold_with(self, v: &mut V) -> Self

source§

fn fold_children_with(self, v: &mut V) -> Self

source§

impl<V: ?Sized + Fold> FoldWith<V> for DocumentFragment

source§

fn fold_with(self, v: &mut V) -> Self

source§

fn fold_children_with(self, v: &mut V) -> Self

source§

impl<V: ?Sized + Fold> FoldWith<V> for DocumentMode

source§

fn fold_with(self, v: &mut V) -> Self

source§

fn fold_children_with(self, v: &mut V) -> Self

source§

impl<V: ?Sized + Fold> FoldWith<V> for DocumentType

source§

fn fold_with(self, v: &mut V) -> Self

source§

fn fold_children_with(self, v: &mut V) -> Self

source§

impl<V: ?Sized + Fold> FoldWith<V> for Element

source§

fn fold_with(self, v: &mut V) -> Self

source§

fn fold_children_with(self, v: &mut V) -> Self

source§

impl<V: ?Sized + Fold> FoldWith<V> for Namespace

source§

fn fold_with(self, v: &mut V) -> Self

source§

fn fold_children_with(self, v: &mut V) -> Self

source§

impl<V: ?Sized + Fold> FoldWith<V> for Span

source§

fn fold_with(self, v: &mut V) -> Self

source§

fn fold_children_with(self, v: &mut V) -> Self

source§

impl<V: ?Sized + Fold> FoldWith<V> for Text

source§

fn fold_with(self, v: &mut V) -> Self

source§

fn fold_children_with(self, v: &mut V) -> Self

Implementors§