Expand description

The Outcome Prelude

The outcome library comes with several types and traits. However, several of these are the most important, while others are optional to be imported. For this reason, the prelude module is provided for quick imports. While it can’t be automatically imported, it does contain the stable interface available for each support Rust edition.

When using the nightly feature, AttemptFrom and AttemptInto are re-exported from this module.

Re-exports

pub use Outcome::Failure;
pub use Outcome::Mistake;
pub use Outcome::Success;

Enums

Aberration is a type that can represent a Mistake, or Failure.

Concern is a type that can represent a Success, or Mistake.

Outcome is a type that represents a Success, Mistake, or Failure.

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.