Trait chalk_solve::ext::CanonicalExt
source · pub trait CanonicalExt<T: HasInterner, I: Interner> {
// Required method
fn map<OP, U>(self, interner: I, op: OP) -> Canonical<U>
where OP: FnOnce(T) -> U,
T: TypeFoldable<I>,
U: TypeFoldable<I> + HasInterner<Interner = I>;
}
Required Methods§
Object Safety§
This trait is not object safe.
Implementations on Foreign Types§
source§impl<T, I> CanonicalExt<T, I> for Canonical<T>where
T: HasInterner<Interner = I>,
I: Interner,
impl<T, I> CanonicalExt<T, I> for Canonical<T>where
T: HasInterner<Interner = I>,
I: Interner,
source§fn map<OP, U>(self, interner: I, op: OP) -> Canonical<U>
fn map<OP, U>(self, interner: I, op: OP) -> Canonical<U>
Maps the contents using op
, but preserving the binders.
NB. op
will be invoked with an instantiated version of the
canonical value, where inference variables (from a fresh
inference context) are used in place of the quantified free
variables. The result should be in terms of those same
inference variables and will be re-canonicalized.