Trait chalk_ir::fold::TypeSuperFoldable
source · [−]pub trait TypeSuperFoldable<I: Interner>: TypeFoldable<I> {
fn super_fold_with<E>(
self,
folder: &mut dyn TypeFolder<I, Error = E>,
outer_binder: DebruijnIndex
) -> Result<Self, E>;
}
Expand description
For types where “fold” invokes a callback on the TypeFolder
, the
TypeSuperFoldable
trait captures the recursive behavior that folds all
the contents of the type.
Required Methods
fn super_fold_with<E>(
self,
folder: &mut dyn TypeFolder<I, Error = E>,
outer_binder: DebruijnIndex
) -> Result<Self, E>
fn super_fold_with<E>(
self,
folder: &mut dyn TypeFolder<I, Error = E>,
outer_binder: DebruijnIndex
) -> Result<Self, E>
Recursively folds the value.
Implementors
impl<I> TypeSuperFoldable<I> for Const<I> where
I: Interner,
impl<I> TypeSuperFoldable<I> for Lifetime<I> where
I: Interner,
impl<I> TypeSuperFoldable<I> for Ty<I> where
I: Interner,
“Super fold” for a type invokes te more detailed callbacks on the type
impl<I: Interner> TypeSuperFoldable<I> for Goal<I>
Superfold folds recursively.