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§
Sourcefn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls a visitor method (visitor.fold_xxx) with self.
Sourcefn fold_children_with(self, visitor: &mut V) -> Self
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: ?Sized + Fold> FoldWith<V> for Option<Atom>
impl<V: ?Sized + Fold> FoldWith<V> for Option<Atom>
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_opt_atom with self. (Extra impl)
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for Option<DocumentFragment>
impl<V: ?Sized + Fold> FoldWith<V> for Option<DocumentFragment>
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_opt_document_fragment with self. (Extra impl)
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for Option<Namespace>
impl<V: ?Sized + Fold> FoldWith<V> for Option<Namespace>
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_opt_namespace with self. (Extra impl)
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for Option<Raw>
impl<V: ?Sized + Fold> FoldWith<V> for Option<Raw>
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_opt_raw with self. (Extra impl)
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for Vec<Attribute>
impl<V: ?Sized + Fold> FoldWith<V> for Vec<Attribute>
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_attributes with self. (Extra impl)
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for Vec<AttributeToken>
impl<V: ?Sized + Fold> FoldWith<V> for Vec<AttributeToken>
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_attribute_tokens with self. (Extra impl)
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for Vec<Child>
impl<V: ?Sized + Fold> FoldWith<V> for Vec<Child>
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_childs with self. (Extra impl)
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for Atom
impl<V: ?Sized + Fold> FoldWith<V> for Atom
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_atom with self. (Extra impl)
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for Attribute
impl<V: ?Sized + Fold> FoldWith<V> for Attribute
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_attribute with self.
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for AttributeToken
impl<V: ?Sized + Fold> FoldWith<V> for AttributeToken
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_attribute_token with self.
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for Child
impl<V: ?Sized + Fold> FoldWith<V> for Child
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_child with self.
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for Comment
impl<V: ?Sized + Fold> FoldWith<V> for Comment
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_comment with self.
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for Document
impl<V: ?Sized + Fold> FoldWith<V> for Document
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_document with self.
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for DocumentFragment
impl<V: ?Sized + Fold> FoldWith<V> for DocumentFragment
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_document_fragment with self.
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for DocumentMode
impl<V: ?Sized + Fold> FoldWith<V> for DocumentMode
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_document_mode with self.
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for DocumentType
impl<V: ?Sized + Fold> FoldWith<V> for DocumentType
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_document_type with self.
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for Element
impl<V: ?Sized + Fold> FoldWith<V> for Element
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_element with self.
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for Namespace
impl<V: ?Sized + Fold> FoldWith<V> for Namespace
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_namespace with self.
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for Raw
impl<V: ?Sized + Fold> FoldWith<V> for Raw
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_raw with self.
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for Span
impl<V: ?Sized + Fold> FoldWith<V> for Span
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_span with self. (Extra impl)
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for Text
impl<V: ?Sized + Fold> FoldWith<V> for Text
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_text with self.
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for Token
impl<V: ?Sized + Fold> FoldWith<V> for Token
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_token with self.
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for TokenAndSpan
impl<V: ?Sized + Fold> FoldWith<V> for TokenAndSpan
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_token_and_span with self.