I learned that the
? operator requires the function’s result error type (let’s call it
F) to implement
E is the error type of the expression I’m applying the operator.
I also recently learned that if I implement
From<E> for F, I also get a “free” implementation of
Into<F> for E. However, the reciprocal is not true; if I implement
Into<E> for F I don’t get an implementation of
From<F> for E.
My question is, why doesn’t the
? operator require the expression’s result error type to implement
Into<F> instead of requiring
F to implement
From<E>? Wouldn’t it be more flexible?
Thanks in advance,