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<Modifiers>

Source§

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

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

Source§

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

Source§

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

Source§

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

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

Source§

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

Source§

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

Source§

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

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

Source§

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

Source§

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

Source§

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

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

Source§

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

Source§

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

Source§

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

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

Source§

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

Source§

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

Source§

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

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

Source§

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

Source§

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

Source§

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

Calls Fold::fold_alternative with self.

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 BoundaryAssertion

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 BoundaryAssertionKind

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 CapturingGroup

Source§

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

Calls Fold::fold_capturing_group with self.

Source§

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

Source§

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

Source§

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

Calls Fold::fold_character with self.

Source§

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

Source§

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

Source§

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

Calls Fold::fold_character_class with self.

Source§

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

Source§

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

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 CharacterClassContentsKind

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 CharacterClassEscape

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 CharacterClassEscapeKind

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 CharacterClassRange

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 CharacterKind

Source§

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

Calls Fold::fold_character_kind with self.

Source§

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

Source§

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

Source§

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

Calls Fold::fold_class_string with self.

Source§

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

Source§

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

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 Disjunction

Source§

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

Calls Fold::fold_disjunction with self.

Source§

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

Source§

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

Source§

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

Calls Fold::fold_dot with self.

Source§

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

Source§

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

Source§

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

Calls Fold::fold_ignore_group with self.

Source§

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

Source§

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

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 LookAroundAssertion

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 LookAroundAssertionKind

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 Modifier

Source§

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

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

Source§

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

Source§

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

Source§

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

Calls Fold::fold_modifiers with self.

Source§

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

Source§

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

Source§

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

Calls Fold::fold_named_reference with self.

Source§

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

Source§

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

Source§

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

Calls Fold::fold_pattern with self.

Source§

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

Source§

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

Source§

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

Calls Fold::fold_quantifier with 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 Term

Source§

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

Calls Fold::fold_term with self.

Source§

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

Source§

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

Source§

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

Source§

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

Implementors§