Trait swc_css_visit::FoldWithPath
source · pub trait FoldWithPath<V: ?Sized + FoldAstPath> {
// Required methods
fn fold_with_path(self, v: &mut V, ast_path: &mut AstKindPath) -> Self;
fn fold_children_with_path(
self,
v: &mut V,
ast_path: &mut AstKindPath
) -> Self;
}
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 fold_with_path(self, v: &mut V, ast_path: &mut AstKindPath) -> Self
fn fold_with_path(self, v: &mut V, ast_path: &mut AstKindPath) -> Self
Calls a visitor method (v.fold_xxx) with self and the ast path.
sourcefn fold_children_with_path(self, v: &mut V, ast_path: &mut AstKindPath) -> Self
fn fold_children_with_path(self, v: &mut V, ast_path: &mut AstKindPath) -> Self
Visit children nodes with v and ast path appended
[AstKind] of self
. The ast path will
be resotred when this method returns.
This is the default implementaton of a handler method in FoldAstPath.
Implementations on Foreign Types§
source§impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for Color
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for Color
fn fold_with_path(self, v: &mut V, __ast_path: &mut AstKindPath) -> Self
fn fold_children_with_path( self, v: &mut V, __ast_path: &mut AstKindPath ) -> Self
source§impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for ContainerQuery
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for ContainerQuery
fn fold_with_path(self, v: &mut V, __ast_path: &mut AstKindPath) -> Self
fn fold_children_with_path( self, v: &mut V, __ast_path: &mut AstKindPath ) -> Self
source§impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for CompoundSelector
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for CompoundSelector
fn fold_with_path(self, v: &mut V, __ast_path: &mut AstKindPath) -> Self
fn fold_children_with_path( self, v: &mut V, __ast_path: &mut AstKindPath ) -> Self
source§impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for UniversalSelector
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for UniversalSelector
fn fold_with_path(self, v: &mut V, __ast_path: &mut AstKindPath) -> Self
fn fold_children_with_path( self, v: &mut V, __ast_path: &mut AstKindPath ) -> Self
source§impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for Vec<ForgivingComplexSelector>
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for Vec<ForgivingComplexSelector>
fn fold_with_path(self, v: &mut V, __ast_path: &mut AstKindPath) -> Self
fn fold_children_with_path( self, v: &mut V, __ast_path: &mut AstKindPath ) -> Self
source§impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for Delimiter
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for Delimiter
fn fold_with_path(self, v: &mut V, __ast_path: &mut AstKindPath) -> Self
fn fold_children_with_path( self, v: &mut V, __ast_path: &mut AstKindPath ) -> Self
source§impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for Option<PageSelectorType>
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for Option<PageSelectorType>
fn fold_with_path(self, v: &mut V, __ast_path: &mut AstKindPath) -> Self
fn fold_children_with_path( self, v: &mut V, __ast_path: &mut AstKindPath ) -> Self
source§impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for Vec<LayerName>
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for Vec<LayerName>
fn fold_with_path(self, v: &mut V, __ast_path: &mut AstKindPath) -> Self
fn fold_children_with_path( self, v: &mut V, __ast_path: &mut AstKindPath ) -> Self
source§impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for SupportsNot
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for SupportsNot
fn fold_with_path(self, v: &mut V, __ast_path: &mut AstKindPath) -> Self
fn fold_children_with_path( self, v: &mut V, __ast_path: &mut AstKindPath ) -> Self
source§impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for MediaFeatureRange
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for MediaFeatureRange
fn fold_with_path(self, v: &mut V, __ast_path: &mut AstKindPath) -> Self
fn fold_children_with_path( self, v: &mut V, __ast_path: &mut AstKindPath ) -> Self
source§impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for Vec<ComplexSelectorChildren>
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for Vec<ComplexSelectorChildren>
fn fold_with_path(self, v: &mut V, __ast_path: &mut AstKindPath) -> Self
fn fold_children_with_path( self, v: &mut V, __ast_path: &mut AstKindPath ) -> Self
source§impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for Vec<CalcProductOrOperator>
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for Vec<CalcProductOrOperator>
fn fold_with_path(self, v: &mut V, __ast_path: &mut AstKindPath) -> Self
fn fold_children_with_path( self, v: &mut V, __ast_path: &mut AstKindPath ) -> Self
source§impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for CombinatorValue
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for CombinatorValue
fn fold_with_path(self, v: &mut V, __ast_path: &mut AstKindPath) -> Self
fn fold_children_with_path( self, v: &mut V, __ast_path: &mut AstKindPath ) -> Self
source§impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for MediaFeaturePlain
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for MediaFeaturePlain
fn fold_with_path(self, v: &mut V, __ast_path: &mut AstKindPath) -> Self
fn fold_children_with_path( self, v: &mut V, __ast_path: &mut AstKindPath ) -> Self
source§impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for Option<Combinator>
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for Option<Combinator>
fn fold_with_path(self, v: &mut V, __ast_path: &mut AstKindPath) -> Self
fn fold_children_with_path( self, v: &mut V, __ast_path: &mut AstKindPath ) -> Self
source§impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for Function
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for Function
fn fold_with_path(self, v: &mut V, __ast_path: &mut AstKindPath) -> Self
fn fold_children_with_path( self, v: &mut V, __ast_path: &mut AstKindPath ) -> Self
source§impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for FrequencyPercentage
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for FrequencyPercentage
fn fold_with_path(self, v: &mut V, __ast_path: &mut AstKindPath) -> Self
fn fold_children_with_path( self, v: &mut V, __ast_path: &mut AstKindPath ) -> Self
source§impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for Option<Number>
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for Option<Number>
fn fold_with_path(self, v: &mut V, __ast_path: &mut AstKindPath) -> Self
fn fold_children_with_path( self, v: &mut V, __ast_path: &mut AstKindPath ) -> Self
source§impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for Ratio
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for Ratio
fn fold_with_path(self, v: &mut V, __ast_path: &mut AstKindPath) -> Self
fn fold_children_with_path( self, v: &mut V, __ast_path: &mut AstKindPath ) -> Self
source§impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for Option<JsWord>
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for Option<JsWord>
fn fold_with_path(self, v: &mut V, __ast_path: &mut AstKindPath) -> Self
fn fold_children_with_path( self, v: &mut V, __ast_path: &mut AstKindPath ) -> Self
source§impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for SequenceOfCustomIdents
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for SequenceOfCustomIdents
fn fold_with_path(self, v: &mut V, __ast_path: &mut AstKindPath) -> Self
fn fold_children_with_path( self, v: &mut V, __ast_path: &mut AstKindPath ) -> Self
source§impl<V, T> FoldWithPath<V> for Box<T>where
V: ?Sized + FoldAstPath,
T: 'static + FoldWithPath<V>,
impl<V, T> FoldWithPath<V> for Box<T>where V: ?Sized + FoldAstPath, T: 'static + FoldWithPath<V>,
source§fn fold_children_with_path(self, v: &mut V, ast_path: &mut AstKindPath) -> Self
fn fold_children_with_path(self, v: &mut V, ast_path: &mut AstKindPath) -> Self
Visit children nodes of self with v