4 ms·
x? will convert the error type for x, E1, to the error type for the calling function, E2, only when a conversion from E1 to E2 is defined. If its not possible t
by edflsafoiewq 8y ago
x? will convert the error type for x, E1, to the error type for the calling function, E2, only when a conversion from E1 to E2 is defined. If its not possible to do this conversion without some contextual information, then this bare conversion can't be defined and x? will not compile. In that case, callers will have to do something like
x.context(...)?
x.map_err(|e| ...)?
...etc...
so they have to provide contextual information.