pub trait CoreFold<L: Language>: Sized + CoreVisit<L> {
// Required method
fn substitute(&self, substitution_fn: SubstitutionFn<'_, L>) -> Self;
// Provided methods
fn shift_in(&self) -> Self { ... }
fn replace_free_var(
&self,
v: impl Upcast<CoreVariable<L>>,
p: impl Upcast<CoreParameter<L>>,
) -> Self { ... }
}
Required Methods§
Sourcefn substitute(&self, substitution_fn: SubstitutionFn<'_, L>) -> Self
fn substitute(&self, substitution_fn: SubstitutionFn<'_, L>) -> Self
Replace uses of variables with values from the substitution.
Provided Methods§
Sourcefn shift_in(&self) -> Self
fn shift_in(&self) -> Self
Produce a version of this term where any debruijn indices which appear free are incremented by one.
Sourcefn replace_free_var(
&self,
v: impl Upcast<CoreVariable<L>>,
p: impl Upcast<CoreParameter<L>>,
) -> Self
fn replace_free_var( &self, v: impl Upcast<CoreVariable<L>>, p: impl Upcast<CoreParameter<L>>, ) -> Self
Replace all appearances of free variable v
with p
.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.