Trait repc::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
pub fn visit_type(&mut self, ty: &Type<I>)
[src]
Called for types.
pub fn visit_annotations(&mut self, annotations: &[Annotation])
[src]
Called for the annotations on a type or field.
pub fn visit_builtin_type(&mut self, builtin_type: BuiltinType, ty: &Type<I>)
[src]
Called for builtin types.
pub fn visit_record(&mut self, record: &Record<I>, ty: &Type<I>)
[src]
Called for records.
pub 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.
pub fn visit_typedef(&mut self, dst: &Type<I>, ty: &Type<I>)
[src]
Called for typedefs.
pub fn visit_array(&mut self, array: &Array<I>, ty: &Type<I>)
[src]
Called for arrays.
pub fn visit_opaque_type(
&mut self,
layout: <I as Layout>::OpaqueLayout,
ty: &Type<I>
)
[src]
&mut self,
layout: <I as Layout>::OpaqueLayout,
ty: &Type<I>
)
Called for opaque types.
pub fn visit_enum(&mut self, variants: &[i128], ty: &Type<I>)
[src]
Called for enums.