pub trait TypeVisitable<I: Interner>: Debug {
    // Required method
    fn visit_with<B>(
        &self,
        visitor: &mut dyn TypeVisitor<I, BreakTy = B>,
        outer_binder: DebruijnIndex
    ) -> ControlFlow<B>;
}
Expand description

Applies the given visitor to a value, producing a visited result of type TypeVisitor::Result.

Required Methods§

source

fn visit_with<B>( &self, visitor: &mut dyn TypeVisitor<I, BreakTy = B>, outer_binder: DebruijnIndex ) -> ControlFlow<B>

Apply the given visitor visitor to self; binders is the number of binders that are in scope when beginning the visitor. Typically binders starts as 0, but is adjusted when we encounter Binders<T> in the IR or other similar constructs.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<A: TypeVisitable<I>, B: TypeVisitable<I>, C: TypeVisitable<I>, D: TypeVisitable<I>, E: TypeVisitable<I>, I: Interner> TypeVisitable<I> for (A, B, C, D, E)

source§

fn visit_with<BT>( &self, visitor: &mut dyn TypeVisitor<I, BreakTy = BT>, outer_binder: DebruijnIndex ) -> ControlFlow<BT>

source§

impl<A: TypeVisitable<I>, B: TypeVisitable<I>, C: TypeVisitable<I>, D: TypeVisitable<I>, I: Interner> TypeVisitable<I> for (A, B, C, D)

source§

fn visit_with<BT>( &self, visitor: &mut dyn TypeVisitor<I, BreakTy = BT>, outer_binder: DebruijnIndex ) -> ControlFlow<BT>

source§

impl<A: TypeVisitable<I>, B: TypeVisitable<I>, C: TypeVisitable<I>, I: Interner> TypeVisitable<I> for (A, B, C)

source§

fn visit_with<BT>( &self, visitor: &mut dyn TypeVisitor<I, BreakTy = BT>, outer_binder: DebruijnIndex ) -> ControlFlow<BT>

source§

impl<A: TypeVisitable<I>, B: TypeVisitable<I>, I: Interner> TypeVisitable<I> for (A, B)

source§

fn visit_with<BT>( &self, visitor: &mut dyn TypeVisitor<I, BreakTy = BT>, outer_binder: DebruijnIndex ) -> ControlFlow<BT>

source§

impl<I: Interner> TypeVisitable<I> for bool

source§

fn visit_with<B>( &self, _visitor: &mut dyn TypeVisitor<I, BreakTy = B>, _outer_binder: DebruijnIndex ) -> ControlFlow<B>

source§

impl<I: Interner> TypeVisitable<I> for ()

source§

fn visit_with<B>( &self, _visitor: &mut dyn TypeVisitor<I, BreakTy = B>, _outer_binder: DebruijnIndex ) -> ControlFlow<B>

source§

impl<I: Interner> TypeVisitable<I> for usize

source§

fn visit_with<B>( &self, _visitor: &mut dyn TypeVisitor<I, BreakTy = B>, _outer_binder: DebruijnIndex ) -> ControlFlow<B>

source§

impl<I: Interner> TypeVisitable<I> for PhantomData<I>

source§

fn visit_with<B>( &self, _visitor: &mut dyn TypeVisitor<I, BreakTy = B>, _outer_binder: DebruijnIndex ) -> ControlFlow<B>

source§

impl<T: TypeVisitable<I>, I: Interner> TypeVisitable<I> for &[T]

source§

fn visit_with<B>( &self, visitor: &mut dyn TypeVisitor<I, BreakTy = B>, outer_binder: DebruijnIndex ) -> ControlFlow<B>

source§

impl<T: TypeVisitable<I>, I: Interner> TypeVisitable<I> for Option<T>

source§

fn visit_with<B>( &self, visitor: &mut dyn TypeVisitor<I, BreakTy = B>, outer_binder: DebruijnIndex ) -> ControlFlow<B>

source§

impl<T: TypeVisitable<I>, I: Interner> TypeVisitable<I> for &T

source§

fn visit_with<B>( &self, visitor: &mut dyn TypeVisitor<I, BreakTy = B>, outer_binder: DebruijnIndex ) -> ControlFlow<B>

source§

impl<T: TypeVisitable<I>, I: Interner> TypeVisitable<I> for Box<T>

source§

fn visit_with<B>( &self, visitor: &mut dyn TypeVisitor<I, BreakTy = B>, outer_binder: DebruijnIndex ) -> ControlFlow<B>

source§

impl<T: TypeVisitable<I>, I: Interner> TypeVisitable<I> for Arc<T>

source§

fn visit_with<B>( &self, visitor: &mut dyn TypeVisitor<I, BreakTy = B>, outer_binder: DebruijnIndex ) -> ControlFlow<B>

source§

impl<T: TypeVisitable<I>, I: Interner> TypeVisitable<I> for Vec<T>

source§

fn visit_with<B>( &self, visitor: &mut dyn TypeVisitor<I, BreakTy = B>, outer_binder: DebruijnIndex ) -> ControlFlow<B>

Implementors§

source§

impl<G, _I> TypeVisitable<_I> for InEnvironment<G>where _I: Interner, G: HasInterner<Interner = _I> + TypeVisitable<_I> + HasInterner,

source§

impl<I, T> TypeVisitable<I> for Canonical<T>where I: Interner, T: HasInterner<Interner = I> + TypeVisitable<I>,

source§

impl<I: Interner> TypeVisitable<I> for AliasTy<I>

source§

impl<I: Interner> TypeVisitable<I> for ClausePriority

source§

impl<I: Interner> TypeVisitable<I> for Constraint<I>

source§

impl<I: Interner> TypeVisitable<I> for DomainGoal<I>

source§

impl<I: Interner> TypeVisitable<I> for FloatTy

source§

impl<I: Interner> TypeVisitable<I> for FromEnv<I>

source§

impl<I: Interner> TypeVisitable<I> for GenericArgData<I>

source§

impl<I: Interner> TypeVisitable<I> for GoalData<I>

source§

impl<I: Interner> TypeVisitable<I> for IntTy

source§

impl<I: Interner> TypeVisitable<I> for Mutability

source§

impl<I: Interner> TypeVisitable<I> for QuantifierKind

source§

impl<I: Interner> TypeVisitable<I> for Safety

source§

impl<I: Interner> TypeVisitable<I> for Scalar

source§

impl<I: Interner> TypeVisitable<I> for UintTy

source§

impl<I: Interner> TypeVisitable<I> for WellFormed<I>

source§

impl<I: Interner> TypeVisitable<I> for WhereClause<I>

source§

impl<I: Interner> TypeVisitable<I> for AdtId<I>

source§

impl<I: Interner> TypeVisitable<I> for AliasEq<I>

source§

impl<I: Interner> TypeVisitable<I> for AnswerSubst<I>

source§

impl<I: Interner> TypeVisitable<I> for AssocTypeId<I>

source§

impl<I: Interner> TypeVisitable<I> for ClosureId<I>

source§

impl<I: Interner> TypeVisitable<I> for Const<I>

source§

impl<I: Interner> TypeVisitable<I> for ConstrainedSubst<I>

source§

impl<I: Interner> TypeVisitable<I> for Constraints<I>

source§

impl<I: Interner> TypeVisitable<I> for CoroutineId<I>

source§

impl<I: Interner> TypeVisitable<I> for DebruijnIndex

source§

impl<I: Interner> TypeVisitable<I> for DynTy<I>

source§

impl<I: Interner> TypeVisitable<I> for Environment<I>

source§

impl<I: Interner> TypeVisitable<I> for EqGoal<I>

source§

impl<I: Interner> TypeVisitable<I> for FnDefId<I>

source§

impl<I: Interner> TypeVisitable<I> for FnPointer<I>

source§

impl<I: Interner> TypeVisitable<I> for FnSubst<I>

source§

impl<I: Interner> TypeVisitable<I> for ForeignDefId<I>

source§

impl<I: Interner> TypeVisitable<I> for GenericArg<I>

source§

impl<I: Interner> TypeVisitable<I> for Goal<I>

source§

impl<I: Interner> TypeVisitable<I> for Goals<I>

source§

impl<I: Interner> TypeVisitable<I> for ImplId<I>

source§

impl<I: Interner> TypeVisitable<I> for Lifetime<I>

source§

impl<I: Interner> TypeVisitable<I> for LifetimeOutlives<I>

source§

impl<I: Interner> TypeVisitable<I> for Normalize<I>

source§

impl<I: Interner> TypeVisitable<I> for OpaqueTy<I>

source§

impl<I: Interner> TypeVisitable<I> for OpaqueTyId<I>

source§

impl<I: Interner> TypeVisitable<I> for PlaceholderIndex

source§

impl<I: Interner> TypeVisitable<I> for ProgramClause<I>

source§

impl<I: Interner> TypeVisitable<I> for ProgramClauseImplication<I>

source§

impl<I: Interner> TypeVisitable<I> for ProgramClauses<I>

source§

impl<I: Interner> TypeVisitable<I> for ProjectionTy<I>

source§

impl<I: Interner> TypeVisitable<I> for QuantifiedWhereClauses<I>

source§

impl<I: Interner> TypeVisitable<I> for Substitution<I>

source§

impl<I: Interner> TypeVisitable<I> for SubtypeGoal<I>

source§

impl<I: Interner> TypeVisitable<I> for TraitId<I>

source§

impl<I: Interner> TypeVisitable<I> for TraitRef<I>

source§

impl<I: Interner> TypeVisitable<I> for Ty<I>

“visiting” a type invokes the visit_ty method on the visitor; this usually (in turn) invokes super_visit_ty to visit the individual parts.

source§

impl<I: Interner> TypeVisitable<I> for TypeOutlives<I>

source§

impl<I: Interner> TypeVisitable<I> for UniverseIndex

source§

impl<T, I: Interner> TypeVisitable<I> for Binders<T>where T: HasInterner + TypeVisitable<I>,