Expand description

Traits for retryable conversions between types.

Much like the rust standard library, the traits in this module provide a way to convert from one type to another type, albeit with a focus on using the Outcome. In outcome’s case, only two traits are provided, AttemptFrom and AttemptInto, which mirror TryFrom and TryInto respectively.

As a library author, you should always prefer implementing AttemptFrom over AttemptInto, as AttemptFrom offers greater flexibility and offers an equivalent AttemptInto implementation for free, thanks to a blanket implementation in the outcome crate.

Generic Implementations

Traits

Outcome’s analogue to TryFrom, and the reciprocal of TryInto.

An attempted conversion that consumes self, which may or may not be expensive. Outcome’s analogue to TryInto.