pub trait TypeIdVisitor {
// Provided methods
fn before_visit_type_id(&mut self, id: TypeId) -> bool { ... }
fn after_visit_type_id(&mut self, id: TypeId) { ... }
fn visit_interface(&mut self, resolve: &Resolve, iface: InterfaceId) { ... }
fn visit_world(&mut self, resolve: &Resolve, world: WorldId) { ... }
fn visit_world_item(&mut self, resolve: &Resolve, item: &WorldItem) { ... }
fn visit_func(&mut self, resolve: &Resolve, func: &Function) { ... }
fn visit_type_id(&mut self, resolve: &Resolve, ty: TypeId) { ... }
fn visit_type_def(&mut self, resolve: &Resolve, ty: &TypeDef) { ... }
fn visit_type(&mut self, resolve: &Resolve, ty: &Type) { ... }
}
Expand description
Helper trait to walk the structure of a type and visit all TypeId
s that
it refers to, possibly transitively.
Provided Methods§
Sourcefn before_visit_type_id(&mut self, id: TypeId) -> bool
fn before_visit_type_id(&mut self, id: TypeId) -> bool
Callback invoked just before a type is visited.
If this function returns false
the type is not visited, otherwise it’s
recursed into.
Sourcefn after_visit_type_id(&mut self, id: TypeId)
fn after_visit_type_id(&mut self, id: TypeId)
Callback invoked once a type is finished being visited.