Trait FoldWith

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

A trait implemented for types that can be visited using a visitor.

Required Methods§

Source

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

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

Source

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

Visit children nodes of self`` with visitor`.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Calls Fold::fold_opt_atom with self. (Extra impl)

Source§

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

Source§

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

Source§

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

Calls Fold::fold_opt_namespace with self. (Extra impl)

Source§

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

Source§

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

Source§

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

Calls Fold::fold_attributes with self. (Extra impl)

Source§

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

Source§

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

Source§

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

Calls Fold::fold_attribute_tokens with self. (Extra impl)

Source§

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

Source§

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

Source§

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

Calls Fold::fold_childs with self. (Extra impl)

Source§

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

Source§

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

Source§

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

Calls Fold::fold_atom with self. (Extra impl)

Source§

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

Source§

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

Source§

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

Calls Fold::fold_attribute with self.

Source§

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

Source§

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

Source§

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

Calls Fold::fold_attribute_token with self.

Source§

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

Source§

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

Source§

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

Calls Fold::fold_cdata_section with self.

Source§

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

Source§

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

Source§

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

Calls Fold::fold_child with self.

Source§

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

Source§

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

Source§

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

Calls Fold::fold_comment with self.

Source§

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

Source§

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

Source§

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

Calls Fold::fold_document with self.

Source§

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

Source§

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

Source§

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

Calls Fold::fold_document_mode with self.

Source§

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

Source§

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

Source§

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

Calls Fold::fold_document_type with self.

Source§

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

Source§

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

Source§

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

Calls Fold::fold_element with self.

Source§

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

Source§

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

Source§

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

Calls Fold::fold_namespace with self.

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Calls Fold::fold_span with self. (Extra impl)

Source§

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

Source§

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

Source§

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

Calls Fold::fold_text with self.

Source§

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

Source§

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

Source§

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

Calls Fold::fold_token with self.

Source§

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

Source§

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

Source§

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

Calls Fold::fold_token_and_span with self.

Source§

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

Implementors§