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
-
- Result<
T>
- Result<
Methods
-
asyncFlatMap<
R> (Future< Result< transform(T data)) → Future<R> >Result< R> > -
Available on Result<
Like asyncMap butT> , provided by the ResultAsyncX extensiontransformreturns its own Result, allowing async failures to short-circuit without nestingFuture<Result<Result<R>>>. -
asyncMap<
R> (Future< R> transform(T data)) → Future<Result< R> > -
Available on Result<
If this is a Success, awaitsT> , provided by the ResultAsyncX extensiontransformapplied to the data and wraps the return value in a new Success. Otherwise resolves immediately with the existing Error.