ResultAsyncX<T> extension

Async transformations applied directly to a Result (not a future).

Unlike FutureResultX which operates on Future<Result<T>>, these methods start from a plain Result<T> and return a Future<Result<R>>, making them useful at the start of an async pipeline or when you already hold a resolved result.

on

Methods

asyncFlatMap<R>(Future<Result<R>> transform(T data)) Future<Result<R>>

Available on Result<T>, provided by the ResultAsyncX extension

Like asyncMap but transform returns its own Result, allowing async failures to short-circuit without nesting Future<Result<Result<R>>>.
asyncMap<R>(Future<R> transform(T data)) Future<Result<R>>

Available on Result<T>, provided by the ResultAsyncX extension

If this is a Success, awaits transform applied to the data and wraps the return value in a new Success. Otherwise resolves immediately with the existing Error.