Trait syn::visit::Visitor [−][src]
Each method of the Visitor trait is a hook to be potentially
overridden. Each method's default implementation recursively visits
the substructure of the input via the corresponding walk
method;
e.g. the visit_mod
method by default calls visit::walk_mod
.
If you want to ensure that your code handles every variant
explicitly, you need to override each method. (And you also need
to monitor future changes to Visitor
in case a new method with a
new default implementation gets introduced.)
Provided Methods
fn visit_ident(&mut self, _ident: &Ident)
fn visit_derive_input(&mut self, derive_input: &DeriveInput)
fn visit_ty(&mut self, ty: &Ty)
fn visit_generics(&mut self, generics: &Generics)
fn visit_ty_param_bound(&mut self, bound: &TyParamBound)
fn visit_poly_trait_ref(
&mut self,
trait_ref: &PolyTraitRef,
modifier: &TraitBoundModifier
)
&mut self,
trait_ref: &PolyTraitRef,
modifier: &TraitBoundModifier
)
fn visit_variant_data(
&mut self,
data: &VariantData,
_ident: &Ident,
_generics: &Generics
)
&mut self,
data: &VariantData,
_ident: &Ident,
_generics: &Generics
)