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 restored 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 AbsoluteColorBase
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for AbsoluteColorBase
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 MediaFeatureRangeComparison
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for MediaFeatureRangeComparison
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 ImportLayerName
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for ImportLayerName
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: ?Sized + FoldAstPath> FoldWithPath<V> for Vec<MediaQuery>
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for Vec<MediaQuery>
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 ComponentValue
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for ComponentValue
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 SizeFeatureRangeComparison
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for SizeFeatureRangeComparison
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 SizeFeatureValue
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for SizeFeatureValue
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 ForgivingComplexSelector
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for 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 Option<Namespace>
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for Option<Namespace>
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 JsWord
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for 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 Vec<ComponentValue>
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for Vec<ComponentValue>
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 Rule
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for Rule
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 AlphaValue
impl<V: ?Sized + FoldAstPath> FoldWithPath<V> for AlphaValue
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