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§