pub trait FoldWithAstPath<V: ?Sized + FoldAstPath> {
// Required methods
fn fold_with_ast_path(
self,
visitor: &mut V,
__ast_path: &mut AstKindPath,
) -> Self;
fn fold_children_with_ast_path(
self,
visitor: &mut V,
__ast_path: &mut AstKindPath,
) -> Self;
}path only.Expand description
A trait implemented for types that can be visited using a visitor.
Required Methods§
Sourcefn fold_with_ast_path(
self,
visitor: &mut V,
__ast_path: &mut AstKindPath,
) -> Self
fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Calls a visitor method (visitor.fold_xxx) with self.
Sourcefn fold_children_with_ast_path(
self,
visitor: &mut V,
__ast_path: &mut AstKindPath,
) -> Self
fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> 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> FoldWithAstPath<V> for Box<T>
impl<V, T> FoldWithAstPath<V> for Box<T>
fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Source§impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Option<Atom>
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Option<Atom>
Source§fn fold_with_ast_path(
self,
visitor: &mut V,
__ast_path: &mut AstKindPath,
) -> Self
fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Calls FoldAstPath::fold_opt_atom with self. (Extra impl)
fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Source§impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Option<Modifiers>
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Option<Modifiers>
Source§fn fold_with_ast_path(
self,
visitor: &mut V,
__ast_path: &mut AstKindPath,
) -> Self
fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Calls FoldAstPath::fold_opt_modifiers with self. (Extra impl)
fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Source§impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Vec<Alternative>
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Vec<Alternative>
Source§fn fold_with_ast_path(
self,
visitor: &mut V,
__ast_path: &mut AstKindPath,
) -> Self
fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Calls FoldAstPath::fold_alternatives with self. (Extra impl)
fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Source§impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Vec<Character>
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Vec<Character>
Source§fn fold_with_ast_path(
self,
visitor: &mut V,
__ast_path: &mut AstKindPath,
) -> Self
fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Calls FoldAstPath::fold_characters with self. (Extra impl)
fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Source§impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Vec<CharacterClassContents>
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Vec<CharacterClassContents>
Source§fn fold_with_ast_path(
self,
visitor: &mut V,
__ast_path: &mut AstKindPath,
) -> Self
fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Calls FoldAstPath::fold_character_class_contentss with self. (Extra impl)
fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Source§impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Vec<ClassString>
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Vec<ClassString>
Source§fn fold_with_ast_path(
self,
visitor: &mut V,
__ast_path: &mut AstKindPath,
) -> Self
fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Calls FoldAstPath::fold_class_strings with self. (Extra impl)
fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Source§impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Vec<Term>
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Vec<Term>
Source§fn fold_with_ast_path(
self,
visitor: &mut V,
__ast_path: &mut AstKindPath,
) -> Self
fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Calls FoldAstPath::fold_terms with self. (Extra impl)
fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Source§impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Alternative
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Alternative
Source§fn fold_with_ast_path(
self,
visitor: &mut V,
__ast_path: &mut AstKindPath,
) -> Self
fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Calls FoldAstPath::fold_alternative with self.
fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Source§impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Atom
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Atom
Source§fn fold_with_ast_path(
self,
visitor: &mut V,
__ast_path: &mut AstKindPath,
) -> Self
fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Calls FoldAstPath::fold_atom with self. (Extra impl)
fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Source§impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for BoundaryAssertion
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for BoundaryAssertion
Source§fn fold_with_ast_path(
self,
visitor: &mut V,
__ast_path: &mut AstKindPath,
) -> Self
fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Calls FoldAstPath::fold_boundary_assertion with self.
fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Source§impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for BoundaryAssertionKind
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for BoundaryAssertionKind
Source§fn fold_with_ast_path(
self,
visitor: &mut V,
__ast_path: &mut AstKindPath,
) -> Self
fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Calls FoldAstPath::fold_boundary_assertion_kind with self.
fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Source§impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for CapturingGroup
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for CapturingGroup
Source§fn fold_with_ast_path(
self,
visitor: &mut V,
__ast_path: &mut AstKindPath,
) -> Self
fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Calls FoldAstPath::fold_capturing_group with self.
fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Source§impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Character
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Character
Source§fn fold_with_ast_path(
self,
visitor: &mut V,
__ast_path: &mut AstKindPath,
) -> Self
fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Calls FoldAstPath::fold_character with self.
fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Source§impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for CharacterClass
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for CharacterClass
Source§fn fold_with_ast_path(
self,
visitor: &mut V,
__ast_path: &mut AstKindPath,
) -> Self
fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Calls FoldAstPath::fold_character_class with self.
fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Source§impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for CharacterClassContents
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for CharacterClassContents
Source§fn fold_with_ast_path(
self,
visitor: &mut V,
__ast_path: &mut AstKindPath,
) -> Self
fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Calls FoldAstPath::fold_character_class_contents with self.
fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Source§impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for CharacterClassContentsKind
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for CharacterClassContentsKind
Source§fn fold_with_ast_path(
self,
visitor: &mut V,
__ast_path: &mut AstKindPath,
) -> Self
fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Calls FoldAstPath::fold_character_class_contents_kind with self.
fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Source§impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for CharacterClassEscape
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for CharacterClassEscape
Source§fn fold_with_ast_path(
self,
visitor: &mut V,
__ast_path: &mut AstKindPath,
) -> Self
fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Calls FoldAstPath::fold_character_class_escape with self.
fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Source§impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for CharacterClassEscapeKind
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for CharacterClassEscapeKind
Source§fn fold_with_ast_path(
self,
visitor: &mut V,
__ast_path: &mut AstKindPath,
) -> Self
fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Calls FoldAstPath::fold_character_class_escape_kind with self.
fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Source§impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for CharacterClassRange
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for CharacterClassRange
Source§fn fold_with_ast_path(
self,
visitor: &mut V,
__ast_path: &mut AstKindPath,
) -> Self
fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Calls FoldAstPath::fold_character_class_range with self.
fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Source§impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for CharacterKind
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for CharacterKind
Source§fn fold_with_ast_path(
self,
visitor: &mut V,
__ast_path: &mut AstKindPath,
) -> Self
fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Calls FoldAstPath::fold_character_kind with self.
fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Source§impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for ClassString
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for ClassString
Source§fn fold_with_ast_path(
self,
visitor: &mut V,
__ast_path: &mut AstKindPath,
) -> Self
fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Calls FoldAstPath::fold_class_string with self.
fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Source§impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for ClassStringDisjunction
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for ClassStringDisjunction
Source§fn fold_with_ast_path(
self,
visitor: &mut V,
__ast_path: &mut AstKindPath,
) -> Self
fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Calls FoldAstPath::fold_class_string_disjunction with self.
fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Source§impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Disjunction
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Disjunction
Source§fn fold_with_ast_path(
self,
visitor: &mut V,
__ast_path: &mut AstKindPath,
) -> Self
fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Calls FoldAstPath::fold_disjunction with self.
fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Source§impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Dot
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Dot
Source§fn fold_with_ast_path(
self,
visitor: &mut V,
__ast_path: &mut AstKindPath,
) -> Self
fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Calls FoldAstPath::fold_dot with self.
fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Source§impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for IgnoreGroup
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for IgnoreGroup
Source§fn fold_with_ast_path(
self,
visitor: &mut V,
__ast_path: &mut AstKindPath,
) -> Self
fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Calls FoldAstPath::fold_ignore_group with self.
fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Source§impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for IndexedReference
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for IndexedReference
Source§fn fold_with_ast_path(
self,
visitor: &mut V,
__ast_path: &mut AstKindPath,
) -> Self
fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Calls FoldAstPath::fold_indexed_reference with self.
fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Source§impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for LookAroundAssertion
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for LookAroundAssertion
Source§fn fold_with_ast_path(
self,
visitor: &mut V,
__ast_path: &mut AstKindPath,
) -> Self
fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Calls FoldAstPath::fold_look_around_assertion with self.
fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Source§impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for LookAroundAssertionKind
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for LookAroundAssertionKind
Source§fn fold_with_ast_path(
self,
visitor: &mut V,
__ast_path: &mut AstKindPath,
) -> Self
fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Calls FoldAstPath::fold_look_around_assertion_kind with self.
fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Source§impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Modifier
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Modifier
Source§fn fold_with_ast_path(
self,
visitor: &mut V,
__ast_path: &mut AstKindPath,
) -> Self
fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Calls FoldAstPath::fold_modifier with self. (Extra impl)
fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Source§impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Modifiers
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Modifiers
Source§fn fold_with_ast_path(
self,
visitor: &mut V,
__ast_path: &mut AstKindPath,
) -> Self
fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Calls FoldAstPath::fold_modifiers with self.
fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Source§impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for NamedReference
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for NamedReference
Source§fn fold_with_ast_path(
self,
visitor: &mut V,
__ast_path: &mut AstKindPath,
) -> Self
fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Calls FoldAstPath::fold_named_reference with self.
fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Source§impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Pattern
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Pattern
Source§fn fold_with_ast_path(
self,
visitor: &mut V,
__ast_path: &mut AstKindPath,
) -> Self
fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Calls FoldAstPath::fold_pattern with self.
fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Source§impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Quantifier
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Quantifier
Source§fn fold_with_ast_path(
self,
visitor: &mut V,
__ast_path: &mut AstKindPath,
) -> Self
fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Calls FoldAstPath::fold_quantifier with self.
fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Source§impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Span
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Span
Source§fn fold_with_ast_path(
self,
visitor: &mut V,
__ast_path: &mut AstKindPath,
) -> Self
fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Calls FoldAstPath::fold_span with self. (Extra impl)
fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Source§impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Term
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Term
Source§fn fold_with_ast_path(
self,
visitor: &mut V,
__ast_path: &mut AstKindPath,
) -> Self
fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Calls FoldAstPath::fold_term with self.
fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Source§impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for UnicodePropertyEscape
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for UnicodePropertyEscape
Source§fn fold_with_ast_path(
self,
visitor: &mut V,
__ast_path: &mut AstKindPath,
) -> Self
fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self
Calls FoldAstPath::fold_unicode_property_escape with self.