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`.
Object Safety§
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<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 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 CdataSection
impl<V: ?Sized + Fold> FoldWith<V> for CdataSection
source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_cdata_section
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 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 ProcessingInstruction
impl<V: ?Sized + Fold> FoldWith<V> for ProcessingInstruction
source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_processing_instruction
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
.