Trait cl_ast::ast_visitor::visit::Visit
source · pub trait Visit<'a>: Sized {
Show 72 methods
// Provided methods
fn visit_span(&mut self, _extents: &'a Span) { ... }
fn visit_mutability(&mut self, _mutable: &'a Mutability) { ... }
fn visit_visibility(&mut self, _vis: &'a Visibility) { ... }
fn visit_sym(&mut self, _name: &'a Sym) { ... }
fn visit_literal(&mut self, l: &'a Literal) { ... }
fn visit_bool(&mut self, _b: &'a bool) { ... }
fn visit_char(&mut self, _c: &'a char) { ... }
fn visit_int(&mut self, _i: &'a u128) { ... }
fn visit_string(&mut self, _s: &'a str) { ... }
fn visit_file(&mut self, f: &'a File) { ... }
fn visit_attrs(&mut self, a: &'a Attrs) { ... }
fn visit_meta(&mut self, m: &'a Meta) { ... }
fn visit_meta_kind(&mut self, kind: &'a MetaKind) { ... }
fn visit_item(&mut self, i: &'a Item) { ... }
fn visit_item_kind(&mut self, kind: &'a ItemKind) { ... }
fn visit_alias(&mut self, a: &'a Alias) { ... }
fn visit_const(&mut self, c: &'a Const) { ... }
fn visit_static(&mut self, s: &'a Static) { ... }
fn visit_module(&mut self, m: &'a Module) { ... }
fn visit_module_kind(&mut self, kind: &'a ModuleKind) { ... }
fn visit_function(&mut self, f: &'a Function) { ... }
fn visit_param(&mut self, p: &'a Param) { ... }
fn visit_struct(&mut self, s: &'a Struct) { ... }
fn visit_struct_kind(&mut self, kind: &'a StructKind) { ... }
fn visit_struct_member(&mut self, m: &'a StructMember) { ... }
fn visit_enum(&mut self, e: &'a Enum) { ... }
fn visit_enum_kind(&mut self, kind: &'a EnumKind) { ... }
fn visit_variant(&mut self, v: &'a Variant) { ... }
fn visit_variant_kind(&mut self, kind: &'a VariantKind) { ... }
fn visit_impl(&mut self, i: &'a Impl) { ... }
fn visit_impl_kind(&mut self, target: &'a ImplKind) { ... }
fn visit_use(&mut self, u: &'a Use) { ... }
fn visit_use_tree(&mut self, tree: &'a UseTree) { ... }
fn visit_ty(&mut self, t: &'a Ty) { ... }
fn visit_ty_kind(&mut self, kind: &'a TyKind) { ... }
fn visit_ty_tuple(&mut self, t: &'a TyTuple) { ... }
fn visit_ty_ref(&mut self, t: &'a TyRef) { ... }
fn visit_ty_fn(&mut self, t: &'a TyFn) { ... }
fn visit_path(&mut self, p: &'a Path) { ... }
fn visit_path_part(&mut self, p: &'a PathPart) { ... }
fn visit_stmt(&mut self, s: &'a Stmt) { ... }
fn visit_stmt_kind(&mut self, kind: &'a StmtKind) { ... }
fn visit_semi(&mut self, _s: &'a Semi) { ... }
fn visit_let(&mut self, l: &'a Let) { ... }
fn visit_expr(&mut self, e: &'a Expr) { ... }
fn visit_expr_kind(&mut self, e: &'a ExprKind) { ... }
fn visit_assign(&mut self, a: &'a Assign) { ... }
fn visit_modify(&mut self, m: &'a Modify) { ... }
fn visit_modify_kind(&mut self, _kind: &'a ModifyKind) { ... }
fn visit_binary(&mut self, b: &'a Binary) { ... }
fn visit_binary_kind(&mut self, _kind: &'a BinaryKind) { ... }
fn visit_unary(&mut self, u: &'a Unary) { ... }
fn visit_unary_kind(&mut self, _kind: &'a UnaryKind) { ... }
fn visit_member(&mut self, m: &'a Member) { ... }
fn visit_member_kind(&mut self, kind: &'a MemberKind) { ... }
fn visit_index(&mut self, i: &'a Index) { ... }
fn visit_structor(&mut self, s: &'a Structor) { ... }
fn visit_fielder(&mut self, f: &'a Fielder) { ... }
fn visit_array(&mut self, a: &'a Array) { ... }
fn visit_array_rep(&mut self, a: &'a ArrayRep) { ... }
fn visit_addrof(&mut self, a: &'a AddrOf) { ... }
fn visit_block(&mut self, b: &'a Block) { ... }
fn visit_group(&mut self, g: &'a Group) { ... }
fn visit_tuple(&mut self, t: &'a Tuple) { ... }
fn visit_loop(&mut self, l: &'a Loop) { ... }
fn visit_while(&mut self, w: &'a While) { ... }
fn visit_if(&mut self, i: &'a If) { ... }
fn visit_for(&mut self, f: &'a For) { ... }
fn visit_else(&mut self, e: &'a Else) { ... }
fn visit_break(&mut self, b: &'a Break) { ... }
fn visit_return(&mut self, r: &'a Return) { ... }
fn visit_continue(&mut self, c: &'a Continue) { ... }
}
Expand description
Immutably walks the entire AST
Each method acts as a customization point.
There are a set of default implementations for enums
under the name or_visit_
*,
provided for ease of use.
For all other nodes, traversal is explicit.
Provided Methods§
fn visit_span(&mut self, _extents: &'a Span)
fn visit_mutability(&mut self, _mutable: &'a Mutability)
fn visit_visibility(&mut self, _vis: &'a Visibility)
fn visit_sym(&mut self, _name: &'a Sym)
fn visit_literal(&mut self, l: &'a Literal)
fn visit_bool(&mut self, _b: &'a bool)
fn visit_char(&mut self, _c: &'a char)
fn visit_int(&mut self, _i: &'a u128)
fn visit_string(&mut self, _s: &'a str)
fn visit_file(&mut self, f: &'a File)
fn visit_attrs(&mut self, a: &'a Attrs)
fn visit_meta(&mut self, m: &'a Meta)
fn visit_meta_kind(&mut self, kind: &'a MetaKind)
fn visit_item(&mut self, i: &'a Item)
fn visit_item_kind(&mut self, kind: &'a ItemKind)
fn visit_alias(&mut self, a: &'a Alias)
fn visit_const(&mut self, c: &'a Const)
fn visit_static(&mut self, s: &'a Static)
fn visit_module(&mut self, m: &'a Module)
fn visit_module_kind(&mut self, kind: &'a ModuleKind)
fn visit_function(&mut self, f: &'a Function)
fn visit_param(&mut self, p: &'a Param)
fn visit_struct(&mut self, s: &'a Struct)
fn visit_struct_kind(&mut self, kind: &'a StructKind)
fn visit_struct_member(&mut self, m: &'a StructMember)
fn visit_enum(&mut self, e: &'a Enum)
fn visit_enum_kind(&mut self, kind: &'a EnumKind)
fn visit_variant(&mut self, v: &'a Variant)
fn visit_variant_kind(&mut self, kind: &'a VariantKind)
fn visit_impl(&mut self, i: &'a Impl)
fn visit_impl_kind(&mut self, target: &'a ImplKind)
fn visit_use(&mut self, u: &'a Use)
fn visit_use_tree(&mut self, tree: &'a UseTree)
fn visit_ty(&mut self, t: &'a Ty)
fn visit_ty_kind(&mut self, kind: &'a TyKind)
fn visit_ty_tuple(&mut self, t: &'a TyTuple)
fn visit_ty_ref(&mut self, t: &'a TyRef)
fn visit_ty_fn(&mut self, t: &'a TyFn)
fn visit_path(&mut self, p: &'a Path)
fn visit_path_part(&mut self, p: &'a PathPart)
fn visit_stmt(&mut self, s: &'a Stmt)
fn visit_stmt_kind(&mut self, kind: &'a StmtKind)
fn visit_semi(&mut self, _s: &'a Semi)
fn visit_let(&mut self, l: &'a Let)
fn visit_expr(&mut self, e: &'a Expr)
fn visit_expr_kind(&mut self, e: &'a ExprKind)
fn visit_assign(&mut self, a: &'a Assign)
fn visit_modify(&mut self, m: &'a Modify)
fn visit_modify_kind(&mut self, _kind: &'a ModifyKind)
fn visit_binary(&mut self, b: &'a Binary)
fn visit_binary_kind(&mut self, _kind: &'a BinaryKind)
fn visit_unary(&mut self, u: &'a Unary)
fn visit_unary_kind(&mut self, _kind: &'a UnaryKind)
fn visit_member(&mut self, m: &'a Member)
fn visit_member_kind(&mut self, kind: &'a MemberKind)
fn visit_index(&mut self, i: &'a Index)
fn visit_structor(&mut self, s: &'a Structor)
fn visit_fielder(&mut self, f: &'a Fielder)
fn visit_array(&mut self, a: &'a Array)
fn visit_array_rep(&mut self, a: &'a ArrayRep)
fn visit_addrof(&mut self, a: &'a AddrOf)
fn visit_block(&mut self, b: &'a Block)
fn visit_group(&mut self, g: &'a Group)
fn visit_tuple(&mut self, t: &'a Tuple)
fn visit_loop(&mut self, l: &'a Loop)
fn visit_while(&mut self, w: &'a While)
fn visit_if(&mut self, i: &'a If)
fn visit_for(&mut self, f: &'a For)
fn visit_else(&mut self, e: &'a Else)
fn visit_break(&mut self, b: &'a Break)
fn visit_return(&mut self, r: &'a Return)
fn visit_continue(&mut self, c: &'a Continue)
Object Safety§
This trait is not object safe.