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 resotred 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 [ComponentValue]
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for [ComponentValue]
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 MediaFeatureRangeInterval
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for MediaFeatureRangeInterval
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 DocumentPrelude
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for DocumentPrelude
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 MediaInParens
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for MediaInParens
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<CalcValueOrOperator>
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for Vec<CalcValueOrOperator>
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 AttributeSelectorValue
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for AttributeSelectorValue
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 Namespace
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for Namespace
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 MediaFeatureBoolean
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for MediaFeatureBoolean
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 [FamilyName]
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for [FamilyName]
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 ColorProfileName
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for ColorProfileName
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 SizeFeatureRangeInterval
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for SizeFeatureRangeInterval
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<Box<Function>>
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for Option<Box<Function>>
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 ImportConditions
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for ImportConditions
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 [PseudoClassSelectorChildren]
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for [PseudoClassSelectorChildren]
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 LayerNameList
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for LayerNameList
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 PseudoElementSelector
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for PseudoElementSelector
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