Function type_equalities::substitute [−][src]
pub fn substitute<T: ?Sized, U: ?Sized, F: TypeFunction<T> + TypeFunction<U>>(
t: ApF<F, T>,
ev: TypeEq<T, U>
) -> ApF<F, U> where
ApF<F, T>: Sized,
ApF<F, U>: Sized,
Expand description
Our workhorse for most of the other coerce implementations, lifting the equality through
an arbitrary TypeFunction
. Do consider using this before writing a custom Consumer.
There is also a receiver version of this, TypeEq::substitute
.