pub trait Visitor: Sized {
Show 135 methods fn walk(&mut self, node: &SyntaxNode) { ... } fn pre_visit(&mut self, _node: &SyntaxNode) { ... } fn post_visit(&mut self, _node: &SyntaxNode) { ... } fn visit_source_file(&mut self, _node: &SourceFile, _options: &mut Options) { ... } fn visit_struct(&mut self, _node: &Struct, _options: &mut Options) { ... } fn visit_union(&mut self, _node: &Union, _options: &mut Options) { ... } fn visit_enum(&mut self, _node: &Enum, _options: &mut Options) { ... } fn visit_fn(&mut self, _node: &Fn, _options: &mut Options) { ... } fn visit_ret_type(&mut self, _node: &RetType, _options: &mut Options) { ... } fn visit_extern_crate(
        &mut self,
        _node: &ExternCrate,
        _options: &mut Options
    ) { ... } fn visit_module(&mut self, _node: &Module, _options: &mut Options) { ... } fn visit_use(&mut self, _node: &Use, _options: &mut Options) { ... } fn visit_static(&mut self, _node: &Static, _options: &mut Options) { ... } fn visit_const(&mut self, _node: &Const, _options: &mut Options) { ... } fn visit_trait(&mut self, _node: &Trait, _options: &mut Options) { ... } fn visit_impl(&mut self, _node: &Impl, _options: &mut Options) { ... } fn visit_type_alias(&mut self, _node: &TypeAlias, _options: &mut Options) { ... } fn visit_macro_call(&mut self, _node: &MacroCall, _options: &mut Options) { ... } fn visit_macro_rules(&mut self, _node: &MacroRules, _options: &mut Options) { ... } fn visit_token_tree(&mut self, _node: &TokenTree, _options: &mut Options) { ... } fn visit_macro_def(&mut self, _node: &MacroDef, _options: &mut Options) { ... } fn visit_paren_type(&mut self, _node: &ParenType, _options: &mut Options) { ... } fn visit_tuple_type(&mut self, _node: &TupleType, _options: &mut Options) { ... } fn visit_macro_type(&mut self, _node: &MacroType, _options: &mut Options) { ... } fn visit_never_type(&mut self, _node: &NeverType, _options: &mut Options) { ... } fn visit_path_type(&mut self, _node: &PathType, _options: &mut Options) { ... } fn visit_ptr_type(&mut self, _node: &PtrType, _options: &mut Options) { ... } fn visit_array_type(&mut self, _node: &ArrayType, _options: &mut Options) { ... } fn visit_slice_type(&mut self, _node: &SliceType, _options: &mut Options) { ... } fn visit_ref_type(&mut self, _node: &RefType, _options: &mut Options) { ... } fn visit_infer_type(&mut self, _node: &InferType, _options: &mut Options) { ... } fn visit_fn_ptr_type(&mut self, _node: &FnPtrType, _options: &mut Options) { ... } fn visit_for_type(&mut self, _node: &ForType, _options: &mut Options) { ... } fn visit_impl_trait_type(
        &mut self,
        _node: &ImplTraitType,
        _options: &mut Options
    ) { ... } fn visit_dyn_trait_type(
        &mut self,
        _node: &DynTraitType,
        _options: &mut Options
    ) { ... } fn visit_or_pat(&mut self, _node: &OrPat, _options: &mut Options) { ... } fn visit_paren_pat(&mut self, _node: &ParenPat, _options: &mut Options) { ... } fn visit_ref_pat(&mut self, _node: &RefPat, _options: &mut Options) { ... } fn visit_box_pat(&mut self, _node: &BoxPat, _options: &mut Options) { ... } fn visit_ident_pat(&mut self, _node: &IdentPat, _options: &mut Options) { ... } fn visit_wildcard_pat(
        &mut self,
        _node: &WildcardPat,
        _options: &mut Options
    ) { ... } fn visit_rest_pat(&mut self, _node: &RestPat, _options: &mut Options) { ... } fn visit_path_pat(&mut self, _node: &PathPat, _options: &mut Options) { ... } fn visit_record_pat(&mut self, _node: &RecordPat, _options: &mut Options) { ... } fn visit_record_pat_field_list(
        &mut self,
        _node: &RecordPatFieldList,
        _options: &mut Options
    ) { ... } fn visit_record_pat_field(
        &mut self,
        _node: &RecordPatField,
        _options: &mut Options
    ) { ... } fn visit_tuple_struct_pat(
        &mut self,
        _node: &TupleStructPat,
        _options: &mut Options
    ) { ... } fn visit_tuple_pat(&mut self, _node: &TuplePat, _options: &mut Options) { ... } fn visit_slice_pat(&mut self, _node: &SlicePat, _options: &mut Options) { ... } fn visit_range_pat(&mut self, _node: &RangePat, _options: &mut Options) { ... } fn visit_literal_pat(&mut self, _node: &LiteralPat, _options: &mut Options) { ... } fn visit_macro_pat(&mut self, _node: &MacroPat, _options: &mut Options) { ... } fn visit_const_block_pat(
        &mut self,
        _node: &ConstBlockPat,
        _options: &mut Options
    ) { ... } fn visit_tuple_expr(&mut self, _node: &TupleExpr, _options: &mut Options) { ... } fn visit_array_expr(&mut self, _node: &ArrayExpr, _options: &mut Options) { ... } fn visit_paren_expr(&mut self, _node: &ParenExpr, _options: &mut Options) { ... } fn visit_path_expr(&mut self, _node: &PathExpr, _options: &mut Options) { ... } fn visit_closure_expr(
        &mut self,
        _node: &ClosureExpr,
        _options: &mut Options
    ) { ... } fn visit_if_expr(&mut self, _node: &IfExpr, _options: &mut Options) { ... } fn visit_while_expr(&mut self, _node: &WhileExpr, _options: &mut Options) { ... } fn visit_condition(&mut self, _node: &Condition, _options: &mut Options) { ... } fn visit_loop_expr(&mut self, _node: &LoopExpr, _options: &mut Options) { ... } fn visit_for_expr(&mut self, _node: &ForExpr, _options: &mut Options) { ... } fn visit_continue_expr(
        &mut self,
        _node: &ContinueExpr,
        _options: &mut Options
    ) { ... } fn visit_break_expr(&mut self, _node: &BreakExpr, _options: &mut Options) { ... } fn visit_label(&mut self, _node: &Label, _options: &mut Options) { ... } fn visit_block_expr(&mut self, _node: &BlockExpr, _options: &mut Options) { ... } fn visit_stmt_list(&mut self, _node: &StmtList, _options: &mut Options) { ... } fn visit_return_expr(&mut self, _node: &ReturnExpr, _options: &mut Options) { ... } fn visit_yield_expr(&mut self, _node: &YieldExpr, _options: &mut Options) { ... } fn visit_match_expr(&mut self, _node: &MatchExpr, _options: &mut Options) { ... } fn visit_match_arm_list(
        &mut self,
        _node: &MatchArmList,
        _options: &mut Options
    ) { ... } fn visit_match_arm(&mut self, _node: &MatchArm, _options: &mut Options) { ... } fn visit_match_guard(&mut self, _node: &MatchGuard, _options: &mut Options) { ... } fn visit_record_expr(&mut self, _node: &RecordExpr, _options: &mut Options) { ... } fn visit_record_expr_field_list(
        &mut self,
        _node: &RecordExprFieldList,
        _options: &mut Options
    ) { ... } fn visit_record_expr_field(
        &mut self,
        _node: &RecordExprField,
        _options: &mut Options
    ) { ... } fn visit_box_expr(&mut self, _node: &BoxExpr, _options: &mut Options) { ... } fn visit_call_expr(&mut self, _node: &CallExpr, _options: &mut Options) { ... } fn visit_index_expr(&mut self, _node: &IndexExpr, _options: &mut Options) { ... } fn visit_method_call_expr(
        &mut self,
        _node: &MethodCallExpr,
        _options: &mut Options
    ) { ... } fn visit_field_expr(&mut self, _node: &FieldExpr, _options: &mut Options) { ... } fn visit_await_expr(&mut self, _node: &AwaitExpr, _options: &mut Options) { ... } fn visit_try_expr(&mut self, _node: &TryExpr, _options: &mut Options) { ... } fn visit_cast_expr(&mut self, _node: &CastExpr, _options: &mut Options) { ... } fn visit_ref_expr(&mut self, _node: &RefExpr, _options: &mut Options) { ... } fn visit_prefix_expr(&mut self, _node: &PrefixExpr, _options: &mut Options) { ... } fn visit_range_expr(&mut self, _node: &RangeExpr, _options: &mut Options) { ... } fn visit_bin_expr(&mut self, _node: &BinExpr, _options: &mut Options) { ... } fn visit_extern_block(
        &mut self,
        _node: &ExternBlock,
        _options: &mut Options
    ) { ... } fn visit_extern_item_list(
        &mut self,
        _node: &ExternItemList,
        _options: &mut Options
    ) { ... } fn visit_variant(&mut self, _node: &Variant, _options: &mut Options) { ... } fn visit_record_field_list(
        &mut self,
        _node: &RecordFieldList,
        _options: &mut Options
    ) { ... } fn visit_record_field(
        &mut self,
        _node: &RecordField,
        _options: &mut Options
    ) { ... } fn visit_tuple_field_list(
        &mut self,
        _node: &TupleFieldList,
        _options: &mut Options
    ) { ... } fn visit_tuple_field(&mut self, _node: &TupleField, _options: &mut Options) { ... } fn visit_variant_list(
        &mut self,
        _node: &VariantList,
        _options: &mut Options
    ) { ... } fn visit_item_list(&mut self, _node: &ItemList, _options: &mut Options) { ... } fn visit_assoc_item_list(
        &mut self,
        _node: &AssocItemList,
        _options: &mut Options
    ) { ... } fn visit_attr(&mut self, _node: &Attr, _options: &mut Options) { ... } fn visit_meta(&mut self, _node: &Meta, _options: &mut Options) { ... } fn visit_use_tree(&mut self, _node: &UseTree, _options: &mut Options) { ... } fn visit_use_tree_list(
        &mut self,
        _node: &UseTreeList,
        _options: &mut Options
    ) { ... } fn visit_path(&mut self, _node: &Path, _options: &mut Options) { ... } fn visit_path_segment(
        &mut self,
        _node: &PathSegment,
        _options: &mut Options
    ) { ... } fn visit_literal(&mut self, _node: &Literal, _options: &mut Options) { ... } fn visit_rename(&mut self, _node: &Rename, _options: &mut Options) { ... } fn visit_visibility(&mut self, _node: &Visibility, _options: &mut Options) { ... } fn visit_where_clause(
        &mut self,
        _node: &WhereClause,
        _options: &mut Options
    ) { ... } fn visit_where_pred(&mut self, _node: &WherePred, _options: &mut Options) { ... } fn visit_abi(&mut self, _node: &Abi, _options: &mut Options) { ... } fn visit_name(&mut self, _node: &Name, _options: &mut Options) { ... } fn visit_name_ref(&mut self, _node: &NameRef, _options: &mut Options) { ... } fn visit_let_stmt(&mut self, _node: &LetStmt, _options: &mut Options) { ... } fn visit_let_else(&mut self, _node: &LetElse, _options: &mut Options) { ... } fn visit_expr_stmt(&mut self, _node: &ExprStmt, _options: &mut Options) { ... } fn visit_generic_param_list(
        &mut self,
        _node: &GenericParamList,
        _options: &mut Options
    ) { ... } fn visit_generic_param(
        &mut self,
        _node: &GenericParam,
        _options: &mut Options
    ) { ... } fn visit_lifetime_param(
        &mut self,
        _node: &LifetimeParam,
        _options: &mut Options
    ) { ... } fn visit_type_param(&mut self, _node: &TypeParam, _options: &mut Options) { ... } fn visit_const_param(&mut self, _node: &ConstParam, _options: &mut Options) { ... } fn visit_generic_arg_list(
        &mut self,
        _node: &GenericArgList,
        _options: &mut Options
    ) { ... } fn visit_lifetime(&mut self, _node: &Lifetime, _options: &mut Options) { ... } fn visit_lifetime_arg(
        &mut self,
        _node: &LifetimeArg,
        _options: &mut Options
    ) { ... } fn visit_type_arg(&mut self, _node: &TypeArg, _options: &mut Options) { ... } fn visit_assoc_type_arg(
        &mut self,
        _node: &AssocTypeArg,
        _options: &mut Options
    ) { ... } fn visit_const_arg(&mut self, _node: &ConstArg, _options: &mut Options) { ... } fn visit_param_list(&mut self, _node: &ParamList, _options: &mut Options) { ... } fn visit_param(&mut self, _node: &Param, _options: &mut Options) { ... } fn visit_self_param(&mut self, _node: &SelfParam, _options: &mut Options) { ... } fn visit_arg_list(&mut self, _node: &ArgList, _options: &mut Options) { ... } fn visit_type_bound(&mut self, _node: &TypeBound, _options: &mut Options) { ... } fn visit_type_bound_list(
        &mut self,
        _node: &TypeBoundList,
        _options: &mut Options
    ) { ... } fn visit_macro_items(&mut self, _node: &MacroItems, _options: &mut Options) { ... } fn visit_macro_stmts(&mut self, _node: &MacroStmts, _options: &mut Options) { ... }
}

Provided Methods

Call this method to perform a in-order traversal on node and its children.

This method is called before visiting a node.

This method is called after visiting a node.

This method is called when visiting a SOURCE_FILE node.

This method is called when visiting a STRUCT node.

This method is called when visiting a UNION node.

This method is called when visiting a ENUM node.

This method is called when visiting a FN node.

This method is called when visiting a RET_TYPE node.

This method is called when visiting a EXTERN_CRATE node.

This method is called when visiting a MODULE node.

This method is called when visiting a USE node.

This method is called when visiting a STATIC node.

This method is called when visiting a CONST node.

This method is called when visiting a TRAIT node.

This method is called when visiting a IMPL node.

This method is called when visiting a TYPE_ALIAS node.

This method is called when visiting a MACRO_CALL node.

This method is called when visiting a MACRO_RULES node.

This method is called when visiting a TOKEN_TREE node.

This method is called when visiting a MACRO_DEF node.

This method is called when visiting a PAREN_TYPE node.

This method is called when visiting a TUPLE_TYPE node.

This method is called when visiting a MACRO_TYPE node.

This method is called when visiting a NEVER_TYPE node.

This method is called when visiting a PATH_TYPE node.

This method is called when visiting a PTR_TYPE node.

This method is called when visiting a ARRAY_TYPE node.

This method is called when visiting a SLICE_TYPE node.

This method is called when visiting a REF_TYPE node.

This method is called when visiting a INFER_TYPE node.

This method is called when visiting a FN_PTR_TYPE node.

This method is called when visiting a FOR_TYPE node.

This method is called when visiting a IMPL_TRAIT_TYPE node.

This method is called when visiting a DYN_TRAIT_TYPE node.

This method is called when visiting a OR_PAT node.

This method is called when visiting a PAREN_PAT node.

This method is called when visiting a REF_PAT node.

This method is called when visiting a BOX_PAT node.

This method is called when visiting a IDENT_PAT node.

This method is called when visiting a WILDCARD_PAT node.

This method is called when visiting a REST_PAT node.

This method is called when visiting a PATH_PAT node.

This method is called when visiting a RECORD_PAT node.

This method is called when visiting a RECORD_PAT_FIELD_LIST node.

This method is called when visiting a RECORD_PAT_FIELD node.

This method is called when visiting a TUPLE_STRUCT_PAT node.

This method is called when visiting a TUPLE_PAT node.

This method is called when visiting a SLICE_PAT node.

This method is called when visiting a RANGE_PAT node.

This method is called when visiting a LITERAL_PAT node.

This method is called when visiting a MACRO_PAT node.

This method is called when visiting a CONST_BLOCK_PAT node.

This method is called when visiting a TUPLE_EXPR node.

This method is called when visiting a ARRAY_EXPR node.

This method is called when visiting a PAREN_EXPR node.

This method is called when visiting a PATH_EXPR node.

This method is called when visiting a CLOSURE_EXPR node.

This method is called when visiting a IF_EXPR node.

This method is called when visiting a WHILE_EXPR node.

This method is called when visiting a CONDITION node.

This method is called when visiting a LOOP_EXPR node.

This method is called when visiting a FOR_EXPR node.

This method is called when visiting a CONTINUE_EXPR node.

This method is called when visiting a BREAK_EXPR node.

This method is called when visiting a LABEL node.

This method is called when visiting a BLOCK_EXPR node.

This method is called when visiting a STMT_LIST node.

This method is called when visiting a RETURN_EXPR node.

This method is called when visiting a YIELD_EXPR node.

This method is called when visiting a MATCH_EXPR node.

This method is called when visiting a MATCH_ARM_LIST node.

This method is called when visiting a MATCH_ARM node.

This method is called when visiting a MATCH_GUARD node.

This method is called when visiting a RECORD_EXPR node.

This method is called when visiting a RECORD_EXPR_FIELD_LIST node.

This method is called when visiting a RECORD_EXPR_FIELD node.

This method is called when visiting a BOX_EXPR node.

This method is called when visiting a CALL_EXPR node.

This method is called when visiting a INDEX_EXPR node.

This method is called when visiting a METHOD_CALL_EXPR node.

This method is called when visiting a FIELD_EXPR node.

This method is called when visiting a AWAIT_EXPR node.

This method is called when visiting a TRY_EXPR node.

This method is called when visiting a CAST_EXPR node.

This method is called when visiting a REF_EXPR node.

This method is called when visiting a PREFIX_EXPR node.

This method is called when visiting a RANGE_EXPR node.

This method is called when visiting a BIN_EXPR node.

This method is called when visiting a EXTERN_BLOCK node.

This method is called when visiting a EXTERN_ITEM_LIST node.

This method is called when visiting a VARIANT node.

This method is called when visiting a RECORD_FIELD_LIST node.

This method is called when visiting a RECORD_FIELD node.

This method is called when visiting a TUPLE_FIELD_LIST node.

This method is called when visiting a TUPLE_FIELD node.

This method is called when visiting a VARIANT_LIST node.

This method is called when visiting a ITEM_LIST node.

This method is called when visiting a ASSOC_ITEM_LIST node.

This method is called when visiting a ATTR node.

This method is called when visiting a META node.

This method is called when visiting a USE_TREE node.

This method is called when visiting a USE_TREE_LIST node.

This method is called when visiting a PATH node.

This method is called when visiting a PATH_SEGMENT node.

This method is called when visiting a LITERAL node.

This method is called when visiting a RENAME node.

This method is called when visiting a VISIBILITY node.

This method is called when visiting a WHERE_CLAUSE node.

This method is called when visiting a WHERE_PRED node.

This method is called when visiting a ABI node.

This method is called when visiting a NAME node.

This method is called when visiting a NAME_REF node.

This method is called when visiting a LET_STMT node.

This method is called when visiting a LET_ELSE node.

This method is called when visiting a EXPR_STMT node.

This method is called when visiting a GENERIC_PARAM_LIST node.

This method is called when visiting a GENERIC_PARAM node.

This method is called when visiting a LIFETIME_PARAM node.

This method is called when visiting a TYPE_PARAM node.

This method is called when visiting a CONST_PARAM node.

This method is called when visiting a GENERIC_ARG_LIST node.

This method is called when visiting a LIFETIME node.

This method is called when visiting a LIFETIME_ARG node.

This method is called when visiting a TYPE_ARG node.

This method is called when visiting a ASSOC_TYPE_ARG node.

This method is called when visiting a CONST_ARG node.

This method is called when visiting a PARAM_LIST node.

This method is called when visiting a PARAM node.

This method is called when visiting a SELF_PARAM node.

This method is called when visiting a ARG_LIST node.

This method is called when visiting a TYPE_BOUND node.

This method is called when visiting a TYPE_BOUND_LIST node.

This method is called when visiting a MACRO_ITEMS node.

This method is called when visiting a MACRO_STMTS node.

Implementors