pub trait TypeVisitor<I>: Sizedwhere
    I: Interner,{
    type BreakTy = !;

    // Provided methods
    fn visit_binder<T>(
        &mut self,
        t: &<I as Interner>::Binder<T>
    ) -> ControlFlow<Self::BreakTy, ()>
       where T: TypeVisitable<I>,
             <I as Interner>::Binder<T>: TypeSuperVisitable<I> { ... }
    fn visit_ty(
        &mut self,
        t: <I as Interner>::Ty
    ) -> ControlFlow<Self::BreakTy, ()>
       where <I as Interner>::Ty: TypeSuperVisitable<I> { ... }
    fn visit_region(
        &mut self,
        _r: <I as Interner>::Region
    ) -> ControlFlow<Self::BreakTy, ()> { ... }
    fn visit_const(
        &mut self,
        c: <I as Interner>::Const
    ) -> ControlFlow<Self::BreakTy, ()>
       where <I as Interner>::Const: TypeSuperVisitable<I> { ... }
    fn visit_predicate(
        &mut self,
        p: <I as Interner>::Predicate
    ) -> ControlFlow<Self::BreakTy, ()>
       where <I as Interner>::Predicate: TypeSuperVisitable<I> { ... }
}
Expand description

This trait is implemented for every visiting traversal. There is a visit method defined for every type of interest. Each such method has a default that recurses into the type’s fields in a non-custom fashion.

Provided Associated Types§

Provided Methods§

source

fn visit_binder<T>( &mut self, t: &<I as Interner>::Binder<T> ) -> ControlFlow<Self::BreakTy, ()>where T: TypeVisitable<I>, <I as Interner>::Binder<T>: TypeSuperVisitable<I>,

source

fn visit_ty(&mut self, t: <I as Interner>::Ty) -> ControlFlow<Self::BreakTy, ()>where <I as Interner>::Ty: TypeSuperVisitable<I>,

source

fn visit_region( &mut self, _r: <I as Interner>::Region ) -> ControlFlow<Self::BreakTy, ()>

source

fn visit_const( &mut self, c: <I as Interner>::Const ) -> ControlFlow<Self::BreakTy, ()>where <I as Interner>::Const: TypeSuperVisitable<I>,

source

fn visit_predicate( &mut self, p: <I as Interner>::Predicate ) -> ControlFlow<Self::BreakTy, ()>where <I as Interner>::Predicate: TypeSuperVisitable<I>,

Implementors§