[][src]Module syn::visit_mut

Syntax tree traversal to mutate an exclusive borrow of a syntax tree in place.

Each method of the VisitMut trait is a hook that can be overridden to customize the behavior when mutating the corresponding type of node. By default, every method recursively visits the substructure of the input by invoking the right visitor method of each of its fields.

pub trait VisitMut {
    /* ... */

    fn visit_expr_binary_mut(&mut self, node: &mut ExprBinary) {
        for attr in &mut node.attrs {
            self.visit_attribute_mut(attr);
        }
        self.visit_expr_mut(&mut *node.left);
        self.visit_bin_op_mut(&mut node.op);
        self.visit_expr_mut(&mut *node.right);
    }

    /* ... */
}

This module is available if Syn is built with the "visit-mut" feature.

Traits

VisitMut

Syntax tree traversal to mutate an exclusive borrow of a syntax tree in place.

Functions

visit_abi_mut
visit_angle_bracketed_generic_arguments_mut
visit_arg_captured_mut
visit_arg_self_mut
visit_arg_self_ref_mut
visit_arm_mut
visit_attr_style_mut
visit_attribute_mut
visit_bare_fn_arg_mut
visit_bare_fn_arg_name_mut
visit_bin_op_mut
visit_binding_mut
visit_block_mut
visit_bound_lifetimes_mut
visit_const_param_mut
visit_constraint_mut
visit_data_enum_mut
visit_data_mut
visit_data_struct_mut
visit_data_union_mut
visit_derive_input_mut
visit_expr_array_mut
visit_expr_assign_mut
visit_expr_assign_op_mut
visit_expr_async_mut
visit_expr_binary_mut
visit_expr_block_mut
visit_expr_box_mut
visit_expr_break_mut
visit_expr_call_mut
visit_expr_cast_mut
visit_expr_closure_mut
visit_expr_continue_mut
visit_expr_field_mut
visit_expr_for_loop_mut
visit_expr_group_mut
visit_expr_if_mut
visit_expr_in_place_mut
visit_expr_index_mut
visit_expr_let_mut
visit_expr_lit_mut
visit_expr_loop_mut
visit_expr_macro_mut
visit_expr_match_mut
visit_expr_method_call_mut
visit_expr_mut
visit_expr_paren_mut
visit_expr_path_mut
visit_expr_range_mut
visit_expr_reference_mut
visit_expr_repeat_mut
visit_expr_return_mut
visit_expr_struct_mut
visit_expr_try_block_mut
visit_expr_try_mut
visit_expr_tuple_mut
visit_expr_type_mut
visit_expr_unary_mut
visit_expr_unsafe_mut
visit_expr_verbatim_mut
visit_expr_while_mut
visit_expr_yield_mut
visit_field_mut
visit_field_pat_mut
visit_field_value_mut
visit_fields_mut
visit_fields_named_mut
visit_fields_unnamed_mut
visit_file_mut
visit_fn_arg_mut
visit_fn_decl_mut
visit_foreign_item_fn_mut
visit_foreign_item_macro_mut
visit_foreign_item_mut
visit_foreign_item_static_mut
visit_foreign_item_type_mut
visit_foreign_item_verbatim_mut
visit_generic_argument_mut
visit_generic_method_argument_mut
visit_generic_param_mut
visit_generics_mut
visit_ident_mut
visit_impl_item_const_mut
visit_impl_item_existential_mut
visit_impl_item_macro_mut
visit_impl_item_method_mut
visit_impl_item_mut
visit_impl_item_type_mut
visit_impl_item_verbatim_mut
visit_index_mut
visit_item_const_mut
visit_item_enum_mut
visit_item_existential_mut
visit_item_extern_crate_mut
visit_item_fn_mut
visit_item_foreign_mod_mut
visit_item_impl_mut
visit_item_macro2_mut
visit_item_macro_mut
visit_item_mod_mut
visit_item_mut
visit_item_static_mut
visit_item_struct_mut
visit_item_trait_alias_mut
visit_item_trait_mut
visit_item_type_mut
visit_item_union_mut
visit_item_use_mut
visit_item_verbatim_mut
visit_label_mut
visit_lifetime_def_mut
visit_lifetime_mut
visit_lit_bool_mut
visit_lit_byte_mut
visit_lit_byte_str_mut
visit_lit_char_mut
visit_lit_float_mut
visit_lit_int_mut
visit_lit_mut
visit_lit_str_mut
visit_lit_verbatim_mut
visit_local_mut
visit_macro_delimiter_mut
visit_macro_mut
visit_member_mut
visit_meta_list_mut
visit_meta_mut
visit_meta_name_value_mut
visit_method_sig_mut
visit_method_turbofish_mut
visit_nested_meta_mut
visit_parenthesized_generic_arguments_mut
visit_pat_box_mut
visit_pat_ident_mut
visit_pat_lit_mut
visit_pat_macro_mut
visit_pat_mut
visit_pat_path_mut
visit_pat_range_mut
visit_pat_ref_mut
visit_pat_slice_mut
visit_pat_struct_mut
visit_pat_tuple_mut
visit_pat_tuple_struct_mut
visit_pat_verbatim_mut
visit_pat_wild_mut
visit_path_arguments_mut
visit_path_mut
visit_path_segment_mut
visit_predicate_eq_mut
visit_predicate_lifetime_mut
visit_predicate_type_mut
visit_qself_mut
visit_range_limits_mut
visit_return_type_mut
visit_span_mut
visit_stmt_mut
visit_trait_bound_modifier_mut
visit_trait_bound_mut
visit_trait_item_const_mut
visit_trait_item_macro_mut
visit_trait_item_method_mut
visit_trait_item_mut
visit_trait_item_type_mut
visit_trait_item_verbatim_mut
visit_type_array_mut
visit_type_bare_fn_mut
visit_type_group_mut
visit_type_impl_trait_mut
visit_type_infer_mut
visit_type_macro_mut
visit_type_mut
visit_type_never_mut
visit_type_param_bound_mut
visit_type_param_mut
visit_type_paren_mut
visit_type_path_mut
visit_type_ptr_mut
visit_type_reference_mut
visit_type_slice_mut
visit_type_trait_object_mut
visit_type_tuple_mut
visit_type_verbatim_mut
visit_un_op_mut
visit_use_glob_mut
visit_use_group_mut
visit_use_name_mut
visit_use_path_mut
visit_use_rename_mut
visit_use_tree_mut
visit_variant_mut
visit_vis_crate_mut
visit_vis_public_mut
visit_vis_restricted_mut
visit_visibility_mut
visit_where_clause_mut
visit_where_predicate_mut