wit_parser

Trait TypeIdVisitor

Source
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 TypeIds that it refers to, possibly transitively.

Provided Methods§

Source

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.

Source

fn after_visit_type_id(&mut self, id: TypeId)

Callback invoked once a type is finished being visited.

Source

fn visit_interface(&mut self, resolve: &Resolve, iface: InterfaceId)

Source

fn visit_world(&mut self, resolve: &Resolve, world: WorldId)

Source

fn visit_world_item(&mut self, resolve: &Resolve, item: &WorldItem)

Source

fn visit_func(&mut self, resolve: &Resolve, func: &Function)

Source

fn visit_type_id(&mut self, resolve: &Resolve, ty: TypeId)

Source

fn visit_type_def(&mut self, resolve: &Resolve, ty: &TypeDef)

Source

fn visit_type(&mut self, resolve: &Resolve, ty: &Type)

Implementors§