Loading
Properties
Returns true if the AsyncResult is Incomplete, false otherwise.
Returns true if the AsyncResult is Success, false otherwise.
Functions
Converts Loading and NotStarted to a AsyncResult of type T. This is to prevent us to having to map everything when we know we don't have a Success value, where types would actually matter.
Converts the current AsyncResult to a AsyncResult of type R if the current value is of type R. If the current value is not of type R, it will return an Error.
Returns the ErrorId if the AsyncResult is Error and has an errorId, else returns null.
Returns the Error itself if the AsyncResult is Error else returns null.
Returns the metadata value from the Error if the AsyncResult is Error, and has metadata or the requested type.
Extracts the value from the AsyncResult if it's a Success, otherwise throws an UnwrapException with the computed message in it.
Extracts the value from the AsyncResult if it's an Error, otherwise throws an UnwrapException with the computed message in it.
Extracts the ErrorId from the AsyncResult if it's an Error with an ErrorId, otherwise throws an UnwrapException with the computed message in it.
Extracts the metadata from the AsyncResult if it's an Error with the metadata of type M, otherwise throws an UnwrapException with the computed message in it.
Extracts the value from the AsyncResult if it's an Error with a Throwable in it, otherwise throws an UnwrapException with the computed message in it.
Returns the current AsyncResult if it matches the given predicate, or an Error if it does not.
Transforms the current AsyncResult to the result of transform if it's a Success, based on its contained value.
Unwraps the AsyncResult inside of the AsyncResult.
Returns the value if the AsyncResult is Success else returns the default value.
Returns the value if the AsyncResult is Success else returns the result of the transform function.
Returns the value if the AsyncResult is Success else returns an empty list.
Returns the value if the AsyncResult is Success else returns an empty map.
Returns the value if the AsyncResult is Success else returns null.
Returns the value if the AsyncResult is Success else returns null.
Transforms the current AsyncResult to the result of transform.
Transforms the Success value via transform. The AsyncResult will change its containing type accordingly.
Runs the block when the result is NotStarted.
Transforms the type of AsyncResult from nullable to non-nullable. If the value is null, it will return an Error. It also allows adding specific metadata to disambiguate errors if necessary, via lazyMetadata.
Spreads a AsyncResult of a Pair into a Pair of AsyncResults.
Spreads a AsyncResult of a Triple into a Triple of AsyncResults.
Returns the throwable if the AsyncResult is Error else returns null.
Extracts the value from the AsyncResult if it's a Success, otherwise throws an UnwrapException.
Extracts the value from the AsyncResult if it's an Error, otherwise throws an UnwrapException.
Extracts the ErrorId from the AsyncResult if it's an Error with an ErrorId, otherwise throws an UnwrapException.
Extracts the metadata from the AsyncResult if it's an Error with metadata of type M, otherwise throws an UnwrapException.
Extracts the value from the AsyncResult if it's an Error with a Throwable, otherwise throws an UnwrapException.
Combines two AsyncResults (the receiver and result) into a single one, by applying the transform to their values.
Combines three AsyncResults (the receiver, result1, and result2) into a single one, by applying the transform to their values.
Combines four AsyncResults (the receiver, result1, result2, and result3) into a single one, by applying the transform to their values.