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<Namespace>
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Option<Namespace>
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_namespace 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<Attribute>
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Vec<Attribute>
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_attributes 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<AttributeToken>
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Vec<AttributeToken>
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_attribute_tokens 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<Child>
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Vec<Child>
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_childs 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 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 Attribute
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Attribute
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_attribute 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 AttributeToken
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for AttributeToken
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_attribute_token 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 CdataSection
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for CdataSection
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_cdata_section 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 Child
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Child
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_child 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 Comment
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Comment
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_comment 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 Document
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Document
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_document 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 DocumentMode
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for DocumentMode
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_document_mode 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 DocumentType
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for DocumentType
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_document_type 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 Element
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Element
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_element 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 Namespace
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Namespace
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_namespace 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 ProcessingInstruction
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for ProcessingInstruction
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_processing_instruction 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 Text
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Text
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_text 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 Token
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Token
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_token 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 TokenAndSpan
impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for TokenAndSpan
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_token_and_span with self.