pub trait FoldOwned {
Show 15 methods
// Provided methods
fn fold_program(&mut self, program: &Program) -> Program { ... }
fn fold_stmt(&mut self, stmt: &Stmt) -> Stmt { ... }
fn fold_block(&mut self, block: &Block) -> Block { ... }
fn fold_expr(&mut self, expr: &Expr) -> Expr { ... }
fn fold_param(&mut self, param: &Param) -> Param { ... }
fn fold_arg(&mut self, arg: &Arg) -> Arg { ... }
fn fold_class_member(&mut self, member: &ClassMember) -> ClassMember { ... }
fn fold_enum_member(&mut self, member: &EnumMember) -> EnumMember { ... }
fn fold_property_hook(&mut self, hook: &PropertyHook) -> PropertyHook { ... }
fn fold_type_hint(&mut self, type_hint: &TypeHint) -> TypeHint { ... }
fn fold_attribute(&mut self, attribute: &Attribute) -> Attribute { ... }
fn fold_catch_clause(&mut self, catch: &CatchClause) -> CatchClause { ... }
fn fold_match_arm(&mut self, arm: &MatchArm) -> MatchArm { ... }
fn fold_closure_use_var(&mut self, var: &ClosureUseVar) -> ClosureUseVar { ... }
fn fold_name(&mut self, name: &Name) -> Name { ... }
}Expand description
Trait for transforming owned PHP AST nodes.
All methods have identity-fold default implementations that call the
corresponding free fold_owned_* function. Override only the node types
you want to change; the rest recurse automatically.
Provided Methods§
fn fold_program(&mut self, program: &Program) -> Program
fn fold_stmt(&mut self, stmt: &Stmt) -> Stmt
fn fold_block(&mut self, block: &Block) -> Block
fn fold_expr(&mut self, expr: &Expr) -> Expr
fn fold_param(&mut self, param: &Param) -> Param
fn fold_arg(&mut self, arg: &Arg) -> Arg
fn fold_class_member(&mut self, member: &ClassMember) -> ClassMember
fn fold_enum_member(&mut self, member: &EnumMember) -> EnumMember
fn fold_property_hook(&mut self, hook: &PropertyHook) -> PropertyHook
fn fold_type_hint(&mut self, type_hint: &TypeHint) -> TypeHint
fn fold_attribute(&mut self, attribute: &Attribute) -> Attribute
fn fold_catch_clause(&mut self, catch: &CatchClause) -> CatchClause
fn fold_match_arm(&mut self, arm: &MatchArm) -> MatchArm
fn fold_closure_use_var(&mut self, var: &ClosureUseVar) -> ClosureUseVar
fn fold_name(&mut self, name: &Name) -> Name
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".