Trait swc_css_visit::VisitWithPath
source · pub trait VisitWithPath<V: ?Sized + VisitAstPath> {
// Required methods
fn visit_with_path<'ast, 'r>(
&'ast self,
v: &mut V,
ast_path: &mut AstNodePath<'r>
)
where 'ast: 'r;
fn visit_children_with_path<'ast, 'r>(
&'ast self,
v: &mut V,
ast_path: &mut AstNodePath<'r>
)
where 'ast: 'r;
}
Available on crate feature
path
only.Expand description
A utility trait implemented for ast nodes, and allow to visit them with a visitor.
Required Methods§
sourcefn visit_with_path<'ast, 'r>(
&'ast self,
v: &mut V,
ast_path: &mut AstNodePath<'r>
)where
'ast: 'r,
fn visit_with_path<'ast, 'r>( &'ast self, v: &mut V, ast_path: &mut AstNodePath<'r> )where 'ast: 'r,
Calls a visitor method (v.visit_xxx) with self and the ast path.
sourcefn visit_children_with_path<'ast, 'r>(
&'ast self,
v: &mut V,
ast_path: &mut AstNodePath<'r>
)where
'ast: 'r,
fn visit_children_with_path<'ast, 'r>( &'ast self, v: &mut V, ast_path: &mut AstNodePath<'r> )where 'ast: 'r,
Visit children nodes with v and ast path appended
AstParentNodeRef describing self
. The ast path will
be restored when this method returns.
This is the default implementaton of a handler method in VisitAstPath.
Implementations on Foreign Types§
source§impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for SequenceOfCustomIdents
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for SequenceOfCustomIdents
fn visit_with_path<'ast, 'r>( &'ast self, v: &mut V, __ast_path: &mut AstNodePath<'r> )where 'ast: 'r,
fn visit_children_with_path<'ast, 'r>( &'ast self, _visitor: &mut V, __ast_path: &mut AstNodePath<'r> )where 'ast: 'r,
source§impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for SupportsCondition
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for SupportsCondition
fn visit_with_path<'ast, 'r>( &'ast self, v: &mut V, __ast_path: &mut AstNodePath<'r> )where 'ast: 'r,
fn visit_children_with_path<'ast, 'r>( &'ast self, _visitor: &mut V, __ast_path: &mut AstNodePath<'r> )where 'ast: 'r,
source§impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for Vec<ContainerQueryType>
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for Vec<ContainerQueryType>
fn visit_with_path<'ast, 'r>( &'ast self, v: &mut V, __ast_path: &mut AstNodePath<'r> )where 'ast: 'r,
fn visit_children_with_path<'ast, 'r>( &'ast self, _visitor: &mut V, __ast_path: &mut AstNodePath<'r> )where 'ast: 'r,
source§impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for Option<AttributeSelectorMatcher>
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for Option<AttributeSelectorMatcher>
fn visit_with_path<'ast, 'r>( &'ast self, v: &mut V, __ast_path: &mut AstNodePath<'r> )where 'ast: 'r,
fn visit_children_with_path<'ast, 'r>( &'ast self, _visitor: &mut V, __ast_path: &mut AstNodePath<'r> )where 'ast: 'r,
source§impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for Atom
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for Atom
fn visit_with_path<'ast, 'r>( &'ast self, v: &mut V, __ast_path: &mut AstNodePath<'r> )where 'ast: 'r,
fn visit_children_with_path<'ast, 'r>( &'ast self, _visitor: &mut V, __ast_path: &mut AstNodePath<'r> )where 'ast: 'r,
source§impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for ContainerCondition
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for ContainerCondition
fn visit_with_path<'ast, 'r>( &'ast self, v: &mut V, __ast_path: &mut AstNodePath<'r> )where 'ast: 'r,
fn visit_children_with_path<'ast, 'r>( &'ast self, _visitor: &mut V, __ast_path: &mut AstNodePath<'r> )where 'ast: 'r,
source§impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for SizeFeatureName
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for SizeFeatureName
fn visit_with_path<'ast, 'r>( &'ast self, v: &mut V, __ast_path: &mut AstNodePath<'r> )where 'ast: 'r,
fn visit_children_with_path<'ast, 'r>( &'ast self, _visitor: &mut V, __ast_path: &mut AstNodePath<'r> )where 'ast: 'r,
source§impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for DocumentPreludeMatchingFunction
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for DocumentPreludeMatchingFunction
fn visit_with_path<'ast, 'r>( &'ast self, v: &mut V, __ast_path: &mut AstNodePath<'r> )where 'ast: 'r,
fn visit_children_with_path<'ast, 'r>( &'ast self, _visitor: &mut V, __ast_path: &mut AstNodePath<'r> )where 'ast: 'r,
source§impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for DeclarationOrAtRule
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for DeclarationOrAtRule
fn visit_with_path<'ast, 'r>( &'ast self, v: &mut V, __ast_path: &mut AstNodePath<'r> )where 'ast: 'r,
fn visit_children_with_path<'ast, 'r>( &'ast self, _visitor: &mut V, __ast_path: &mut AstNodePath<'r> )where 'ast: 'r,
source§impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for ImportPrelude
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for ImportPrelude
fn visit_with_path<'ast, 'r>( &'ast self, v: &mut V, __ast_path: &mut AstNodePath<'r> )where 'ast: 'r,
fn visit_children_with_path<'ast, 'r>( &'ast self, _visitor: &mut V, __ast_path: &mut AstNodePath<'r> )where 'ast: 'r,
source§impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for NamespacePrefix
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for NamespacePrefix
fn visit_with_path<'ast, 'r>( &'ast self, v: &mut V, __ast_path: &mut AstNodePath<'r> )where 'ast: 'r,
fn visit_children_with_path<'ast, 'r>( &'ast self, _visitor: &mut V, __ast_path: &mut AstNodePath<'r> )where 'ast: 'r,
source§impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for Rule
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for Rule
fn visit_with_path<'ast, 'r>( &'ast self, v: &mut V, __ast_path: &mut AstNodePath<'r> )where 'ast: 'r,
fn visit_children_with_path<'ast, 'r>( &'ast self, _visitor: &mut V, __ast_path: &mut AstNodePath<'r> )where 'ast: 'r,
source§impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for JsWord
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for JsWord
fn visit_with_path<'ast, 'r>( &'ast self, v: &mut V, __ast_path: &mut AstNodePath<'r> )where 'ast: 'r,
fn visit_children_with_path<'ast, 'r>( &'ast self, _visitor: &mut V, __ast_path: &mut AstNodePath<'r> )where 'ast: 'r,
source§impl<V, T> VisitWithPath<V> for Box<T>where
V: ?Sized + VisitAstPath,
T: 'static + VisitWithPath<V>,
impl<V, T> VisitWithPath<V> for Box<T>where V: ?Sized + VisitAstPath, T: 'static + VisitWithPath<V>,
source§fn visit_children_with_path<'ast, 'r>(
&'ast self,
v: &mut V,
ast_path: &mut AstNodePath<'r>
)where
'ast: 'r,
fn visit_children_with_path<'ast, 'r>( &'ast self, v: &mut V, ast_path: &mut AstNodePath<'r> )where 'ast: 'r,
Visit children nodes of self with v