explicit_outcome library

A library for the explicit_outcome package.

This library provides utilities for working with explicit outcomes, such as results and options, in a way that promotes explicit and predictable development.

Classes

AsyncOpt<T extends Object>
Lazy asynchronous Opt composition.
AsyncRes<T extends Object, E extends Object>
Lazy asynchronous Res composition.
Err<T extends Object, E extends Object>
A Result representing a failed operation.
Nil<T extends Object>
An Option representing absence of a value.
Ok<T extends Object, E extends Object>
A Result representing a successful operation.
Option<T extends Object>
A generic Option type that represents either a Val value or a Nil (absence of value).
Result<T extends Object, E extends Object>
A generic Result type that represents either an Ok success or an Err error.
Val<T extends Object>
An Option representing a present, non-null value.

Extensions

AsyncOptConveniences on AsyncOpt<T>
Convenience methods for consuming lazy asynchronous Opt values.

Typedefs

Failure<T extends Object, E extends Object> = Err<T, E>
Compatibility alias for Err.
Opt<T extends Object> = Option<T>
Compact alias for Option.
OptionAsync<T extends Object> = Future<Opt<T>>
Alias for an asynchronous Opt.
Res<T extends Object, E extends Object> = Result<T, E>
Compact alias for Result.
ResultAsync<T extends Object, E extends Object> = Future<Res<T, E>>
Alias for an asynchronous Res.
Success<T extends Object, E extends Object> = Ok<T, E>
Compatibility alias for Ok.