Trait chalk_ir::visit::TypeVisitable
source · 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§
sourcefn visit_with<B>(
&self,
visitor: &mut dyn TypeVisitor<I, BreakTy = B>,
outer_binder: DebruijnIndex,
) -> ControlFlow<B>
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)
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)
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)
impl<A: TypeVisitable<I>, B: TypeVisitable<I>, C: TypeVisitable<I>, D: TypeVisitable<I>, I: Interner> TypeVisitable<I> for (A, B, C, D)
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)
impl<A: TypeVisitable<I>, B: TypeVisitable<I>, C: TypeVisitable<I>, I: Interner> TypeVisitable<I> for (A, B, C)
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)
impl<A: TypeVisitable<I>, B: TypeVisitable<I>, I: Interner> TypeVisitable<I> for (A, B)
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
impl<I: Interner> TypeVisitable<I> for bool
fn visit_with<B>( &self, _visitor: &mut dyn TypeVisitor<I, BreakTy = B>, _outer_binder: DebruijnIndex, ) -> ControlFlow<B>
source§impl<I: Interner> TypeVisitable<I> for ()
impl<I: Interner> TypeVisitable<I> for ()
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
impl<I: Interner> TypeVisitable<I> for usize
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>
impl<I: Interner> TypeVisitable<I> for PhantomData<I>
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]
impl<T: TypeVisitable<I>, I: Interner> TypeVisitable<I> for &[T]
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>
impl<T: TypeVisitable<I>, I: Interner> TypeVisitable<I> for Option<T>
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
impl<T: TypeVisitable<I>, I: Interner> TypeVisitable<I> for &T
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>
impl<T: TypeVisitable<I>, I: Interner> TypeVisitable<I> for Box<T>
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>
impl<T: TypeVisitable<I>, I: Interner> TypeVisitable<I> for Arc<T>
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>
impl<T: TypeVisitable<I>, I: Interner> TypeVisitable<I> for Vec<T>
fn visit_with<B>( &self, visitor: &mut dyn TypeVisitor<I, BreakTy = B>, outer_binder: DebruijnIndex, ) -> ControlFlow<B>
Implementors§
impl<G, _I> TypeVisitable<_I> for InEnvironment<G>
impl<I, T> TypeVisitable<I> for Canonical<T>
impl<I: Interner> TypeVisitable<I> for AliasTy<I>
impl<I: Interner> TypeVisitable<I> for ClausePriority
impl<I: Interner> TypeVisitable<I> for Constraint<I>
impl<I: Interner> TypeVisitable<I> for DomainGoal<I>
impl<I: Interner> TypeVisitable<I> for FloatTy
impl<I: Interner> TypeVisitable<I> for FromEnv<I>
impl<I: Interner> TypeVisitable<I> for GenericArgData<I>
impl<I: Interner> TypeVisitable<I> for GoalData<I>
impl<I: Interner> TypeVisitable<I> for IntTy
impl<I: Interner> TypeVisitable<I> for Mutability
impl<I: Interner> TypeVisitable<I> for QuantifierKind
impl<I: Interner> TypeVisitable<I> for Safety
impl<I: Interner> TypeVisitable<I> for Scalar
impl<I: Interner> TypeVisitable<I> for UintTy
impl<I: Interner> TypeVisitable<I> for WellFormed<I>
impl<I: Interner> TypeVisitable<I> for WhereClause<I>
impl<I: Interner> TypeVisitable<I> for AdtId<I>
impl<I: Interner> TypeVisitable<I> for AliasEq<I>
impl<I: Interner> TypeVisitable<I> for AnswerSubst<I>
impl<I: Interner> TypeVisitable<I> for AssocTypeId<I>
impl<I: Interner> TypeVisitable<I> for ClosureId<I>
impl<I: Interner> TypeVisitable<I> for Const<I>
impl<I: Interner> TypeVisitable<I> for ConstrainedSubst<I>
impl<I: Interner> TypeVisitable<I> for Constraints<I>
impl<I: Interner> TypeVisitable<I> for CoroutineId<I>
impl<I: Interner> TypeVisitable<I> for DebruijnIndex
impl<I: Interner> TypeVisitable<I> for DynTy<I>
impl<I: Interner> TypeVisitable<I> for Environment<I>
impl<I: Interner> TypeVisitable<I> for EqGoal<I>
impl<I: Interner> TypeVisitable<I> for FnDefId<I>
impl<I: Interner> TypeVisitable<I> for FnPointer<I>
impl<I: Interner> TypeVisitable<I> for FnSubst<I>
impl<I: Interner> TypeVisitable<I> for ForeignDefId<I>
impl<I: Interner> TypeVisitable<I> for GenericArg<I>
impl<I: Interner> TypeVisitable<I> for Goal<I>
impl<I: Interner> TypeVisitable<I> for Goals<I>
impl<I: Interner> TypeVisitable<I> for ImplId<I>
impl<I: Interner> TypeVisitable<I> for Lifetime<I>
impl<I: Interner> TypeVisitable<I> for LifetimeOutlives<I>
impl<I: Interner> TypeVisitable<I> for Normalize<I>
impl<I: Interner> TypeVisitable<I> for OpaqueTy<I>
impl<I: Interner> TypeVisitable<I> for OpaqueTyId<I>
impl<I: Interner> TypeVisitable<I> for PlaceholderIndex
impl<I: Interner> TypeVisitable<I> for ProgramClause<I>
impl<I: Interner> TypeVisitable<I> for ProgramClauseImplication<I>
impl<I: Interner> TypeVisitable<I> for ProgramClauses<I>
impl<I: Interner> TypeVisitable<I> for ProjectionTy<I>
impl<I: Interner> TypeVisitable<I> for QuantifiedWhereClauses<I>
impl<I: Interner> TypeVisitable<I> for Substitution<I>
impl<I: Interner> TypeVisitable<I> for SubtypeGoal<I>
impl<I: Interner> TypeVisitable<I> for TraitId<I>
impl<I: Interner> TypeVisitable<I> for TraitRef<I>
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.