Trait repc_impl::visitor::Visitor [−][src]
This trait represents a visitor that walks through a Type.
Each method's default implementation is accessible through the function of the same name in the
visitor module.
Example
struct Impl; impl<I: Layout> Visitor<I> for Impl { fn visit_enum(&mut self, variants: &[i128], ty: &Type<I>) { println!("Variants: {:?}", variants); visit_enum(self, variants, ty) } }
Provided methods
fn visit_type(&mut self, ty: &Type<I>)[src]
Called for types.
fn visit_annotations(&mut self, annotations: &[Annotation])[src]
Called for the annotations on a type or field.
fn visit_builtin_type(&mut self, builtin_type: BuiltinType, ty: &Type<I>)[src]
Called for builtin types.
fn visit_record(&mut self, record: &Record<I>, ty: &Type<I>)[src]
Called for records.
fn visit_record_field(
&mut self,
field: &RecordField<I>,
record: &Record<I>,
ty: &Type<I>
)[src]
&mut self,
field: &RecordField<I>,
record: &Record<I>,
ty: &Type<I>
)
Called for record fields.
fn visit_typedef(&mut self, dst: &Type<I>, ty: &Type<I>)[src]
Called for typedefs.
fn visit_array(&mut self, array: &Array<I>, ty: &Type<I>)[src]
Called for arrays.
fn visit_opaque_type(&mut self, layout: I::OpaqueLayout, ty: &Type<I>)[src]
Called for opaque types.
fn visit_enum(&mut self, variants: &[i128], ty: &Type<I>)[src]
Called for enums.