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 SupportsInParens
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for SupportsInParens
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 ClassSelector
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for ClassSelector
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 CompoundSelectorList
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for CompoundSelectorList
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 RelativeSelectorList
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for RelativeSelectorList
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 SupportsCondition
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for SupportsCondition
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 MediaFeatureBoolean
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for MediaFeatureBoolean
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 ImportHref
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for ImportHref
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 TokenAndSpan
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for TokenAndSpan
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 QueryInParens
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for QueryInParens
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 DeclarationName
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for DeclarationName
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<Box<MediaQueryList>>
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for Option<Box<MediaQueryList>>
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 Angle
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for Angle
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 MediaConditionType
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for MediaConditionType
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 AttributeSelectorModifier
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for AttributeSelectorModifier
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 PageSelectorType
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for 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<MediaConditionAllType>
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for Vec<MediaConditionAllType>
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 Percentage
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for Percentage
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 ForgivingRelativeSelector
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for ForgivingRelativeSelector
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 ContainerQueryAnd
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for ContainerQueryAnd
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 PageSelector
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for PageSelector
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<CalcValueOrOperator>
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for Vec<CalcValueOrOperator>
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