Trait FoldWithAstPath

Source
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;
}
Available on crate feature path only.
Expand description

A trait implemented for types that can be visited using a visitor.

Required Methods§

Source

fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self

Calls a visitor method (visitor.fold_xxx) with self.

Source

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>
where V: ?Sized + FoldAstPath, T: FoldWithAstPath<V>,

Source§

fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self

Source§

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>

Source§

fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self

Calls FoldAstPath::fold_opt_atom with self. (Extra impl)

Source§

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>

Source§

fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self

Calls FoldAstPath::fold_opt_namespace with self. (Extra impl)

Source§

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>

Source§

fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self

Calls FoldAstPath::fold_attributes with self. (Extra impl)

Source§

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>

Source§

fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self

Calls FoldAstPath::fold_attribute_tokens with self. (Extra impl)

Source§

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>

Source§

fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self

Calls FoldAstPath::fold_childs with self. (Extra impl)

Source§

fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self

Source§

impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Atom

Source§

fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self

Calls FoldAstPath::fold_atom with self. (Extra impl)

Source§

fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self

Source§

impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Attribute

Source§

fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self

Calls FoldAstPath::fold_attribute with self.

Source§

fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self

Source§

impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for AttributeToken

Source§

fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self

Source§

fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self

Source§

impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for CdataSection

Source§

fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self

Source§

fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self

Source§

impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Child

Source§

fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self

Calls FoldAstPath::fold_child with self.

Source§

fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self

Source§

impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Comment

Source§

fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self

Calls FoldAstPath::fold_comment with self.

Source§

fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self

Source§

impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Document

Source§

fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self

Calls FoldAstPath::fold_document with self.

Source§

fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self

Source§

impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for DocumentMode

Source§

fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self

Source§

fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self

Source§

impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for DocumentType

Source§

fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self

Source§

fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self

Source§

impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Element

Source§

fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self

Calls FoldAstPath::fold_element with self.

Source§

fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self

Source§

impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Namespace

Source§

fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self

Calls FoldAstPath::fold_namespace with self.

Source§

fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self

Source§

impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for ProcessingInstruction

Source§

fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self

Source§

fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self

Source§

impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Span

Source§

fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self

Calls FoldAstPath::fold_span with self. (Extra impl)

Source§

fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self

Source§

impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Text

Source§

fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self

Calls FoldAstPath::fold_text with self.

Source§

fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self

Source§

impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for Token

Source§

fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self

Calls FoldAstPath::fold_token with self.

Source§

fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self

Source§

impl<V: ?Sized + FoldAstPath> FoldWithAstPath<V> for TokenAndSpan

Source§

fn fold_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self

Source§

fn fold_children_with_ast_path( self, visitor: &mut V, __ast_path: &mut AstKindPath, ) -> Self

Implementors§