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 SimpleBlock
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for SimpleBlock
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 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 PageSelectorPseudo
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for PageSelectorPseudo
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 CombinatorValue
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for CombinatorValue
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 [ComplexSelectorChildren]
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for [ComplexSelectorChildren]
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<NestingSelector>
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for Option<NestingSelector>
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 CalcSum
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for CalcSum
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 ContainerName
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for ContainerName
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 Ratio
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for Ratio
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 Flex
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for Flex
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 Str
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for Str
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 RelativeSelector
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for RelativeSelector
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 KeyframeSelector
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for KeyframeSelector
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<Ident>
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for Option<Ident>
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 ImportHref
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for ImportHref
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 AttributeSelector
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for AttributeSelector
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 [PageSelectorPseudo]
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for [PageSelectorPseudo]
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 CalcOperatorType
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for CalcOperatorType
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<ForgivingRelativeSelector>
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for Vec<ForgivingRelativeSelector>
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<TypeSelector>>
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for Option<Box<TypeSelector>>
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 NamedNamespace
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for NamedNamespace
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<DocumentPreludeMatchingFunction>
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for Vec<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 DeclarationName
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for DeclarationName
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 SizeFeature
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for SizeFeature
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 RelativeSelectorList
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for RelativeSelectorList
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 [KeyframeSelector]
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for [KeyframeSelector]
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 KeyframesPseudoFunction
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for KeyframesPseudoFunction
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 SizeFeatureBoolean
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for SizeFeatureBoolean
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<MediaConditionAllType>
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for Vec<MediaConditionAllType>
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 Delimiter
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for Delimiter
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<SupportsConditionType>
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for Vec<SupportsConditionType>
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 CalcProductOrOperator
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for CalcProductOrOperator
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 AtRuleName
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for AtRuleName
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<MediaQuery>
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for Vec<MediaQuery>
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<MediaConditionType>>
impl<V: ?Sized + VisitAstPath> VisitWithPath<V> for Option<Box<MediaConditionType>>
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