Closed

Description
The error interoperation RFC (rust-lang/rfcs#201) did not cover adapting the current APIs such as Result to be more general purpose with regards to the new FromError
trait.
It seems to me that the current signatures of and
and and_then
:
fn and<U>(self, res: Result<U, E>) -> Result<U, E>
fn and_then<U>(self, op: |T| -> Result<U, E>) -> Result<U, E>
could now be:
fn and<U, F: FromError<E>>(self, res: Result<U, F>) -> Result<U, F>
fn and_then<U, F: FromError<E>>(self, op: |T| -> Result<U, F>) -> Result<U, F>
to allow using these combinators in the same cross-boundary fashion as the try!
macro.
This would also require a blanket implementation of FromError<E>
for any E.
Metadata
Metadata
Assignees
Labels
No labels