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<Modifiers>
impl<V: ?Sized + Fold> FoldWith<V> for Option<Modifiers>
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_opt_modifiers with self. (Extra impl)
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for Vec<Alternative>
impl<V: ?Sized + Fold> FoldWith<V> for Vec<Alternative>
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_alternatives with self. (Extra impl)
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for Vec<Character>
impl<V: ?Sized + Fold> FoldWith<V> for Vec<Character>
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_characters with self. (Extra impl)
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for Vec<CharacterClassContents>
impl<V: ?Sized + Fold> FoldWith<V> for Vec<CharacterClassContents>
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_character_class_contentss with self. (Extra impl)
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for Vec<ClassString>
impl<V: ?Sized + Fold> FoldWith<V> for Vec<ClassString>
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_class_strings with self. (Extra impl)
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for Vec<Term>
impl<V: ?Sized + Fold> FoldWith<V> for Vec<Term>
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_terms with self. (Extra impl)
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for Alternative
impl<V: ?Sized + Fold> FoldWith<V> for Alternative
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_alternative with self.
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 BoundaryAssertion
impl<V: ?Sized + Fold> FoldWith<V> for BoundaryAssertion
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_boundary_assertion with self.
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for BoundaryAssertionKind
impl<V: ?Sized + Fold> FoldWith<V> for BoundaryAssertionKind
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_boundary_assertion_kind with self.
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for CapturingGroup
impl<V: ?Sized + Fold> FoldWith<V> for CapturingGroup
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_capturing_group with self.
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for Character
impl<V: ?Sized + Fold> FoldWith<V> for Character
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_character with self.
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for CharacterClass
impl<V: ?Sized + Fold> FoldWith<V> for CharacterClass
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_character_class with self.
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for CharacterClassContents
impl<V: ?Sized + Fold> FoldWith<V> for CharacterClassContents
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_character_class_contents with self.
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for CharacterClassContentsKind
impl<V: ?Sized + Fold> FoldWith<V> for CharacterClassContentsKind
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_character_class_contents_kind with self.
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for CharacterClassEscape
impl<V: ?Sized + Fold> FoldWith<V> for CharacterClassEscape
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_character_class_escape with self.
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for CharacterClassEscapeKind
impl<V: ?Sized + Fold> FoldWith<V> for CharacterClassEscapeKind
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_character_class_escape_kind with self.
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for CharacterClassRange
impl<V: ?Sized + Fold> FoldWith<V> for CharacterClassRange
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_character_class_range with self.
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for CharacterKind
impl<V: ?Sized + Fold> FoldWith<V> for CharacterKind
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_character_kind with self.
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for ClassString
impl<V: ?Sized + Fold> FoldWith<V> for ClassString
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_class_string with self.
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for ClassStringDisjunction
impl<V: ?Sized + Fold> FoldWith<V> for ClassStringDisjunction
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_class_string_disjunction with self.
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for Disjunction
impl<V: ?Sized + Fold> FoldWith<V> for Disjunction
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_disjunction with self.
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for Dot
impl<V: ?Sized + Fold> FoldWith<V> for Dot
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_dot with self.
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for IgnoreGroup
impl<V: ?Sized + Fold> FoldWith<V> for IgnoreGroup
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_ignore_group with self.
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for IndexedReference
impl<V: ?Sized + Fold> FoldWith<V> for IndexedReference
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_indexed_reference with self.
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for LookAroundAssertion
impl<V: ?Sized + Fold> FoldWith<V> for LookAroundAssertion
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_look_around_assertion with self.
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for LookAroundAssertionKind
impl<V: ?Sized + Fold> FoldWith<V> for LookAroundAssertionKind
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_look_around_assertion_kind with self.
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for Modifier
impl<V: ?Sized + Fold> FoldWith<V> for Modifier
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_modifier with self. (Extra impl)
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for Modifiers
impl<V: ?Sized + Fold> FoldWith<V> for Modifiers
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_modifiers with self.
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for NamedReference
impl<V: ?Sized + Fold> FoldWith<V> for NamedReference
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_named_reference with self.
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for Pattern
impl<V: ?Sized + Fold> FoldWith<V> for Pattern
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_pattern with self.
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for Quantifier
impl<V: ?Sized + Fold> FoldWith<V> for Quantifier
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_quantifier 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 Term
impl<V: ?Sized + Fold> FoldWith<V> for Term
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_term with self.
fn fold_children_with(self, visitor: &mut V) -> Self
Source§impl<V: ?Sized + Fold> FoldWith<V> for UnicodePropertyEscape
impl<V: ?Sized + Fold> FoldWith<V> for UnicodePropertyEscape
Source§fn fold_with(self, visitor: &mut V) -> Self
fn fold_with(self, visitor: &mut V) -> Self
Calls Fold::fold_unicode_property_escape with self.