AsyncResultOps<T, E extends Object> extension
Async composition helpers for Future<Result<T, E>>.
Methods
-
flatMap<
R> (FutureOr< Result< transform(T value)) → Future<R, E> >Result< R, E> > -
Available on Future<
Chains anotherResult< , provided by the AsyncResultOps extensionT, E> >Result-producing sync or async transform on success. -
flatMapError<
F extends Object> (FutureOr< Result< transform(E error)) → Future<T, F> >Result< T, F> > -
Available on Future<
Chains anotherResult< , provided by the AsyncResultOps extensionT, E> >Result-producing sync or async transform on failure. -
map<
R> (FutureOr< R> transform(T value)) → Future<Result< R, E> > -
Available on Future<
Transforms a success value with a sync or asyncResult< , provided by the AsyncResultOps extensionT, E> >transform. -
mapError<
F extends Object> (FutureOr< F> transform(E error)) → Future<Result< T, F> > -
Available on Future<
Transforms a failure error with a sync or asyncResult< , provided by the AsyncResultOps extensionT, E> >transform. -
recover(
FutureOr< T> transform(E error)) → Future<Result< T, E> > -
Available on Future<
Converts a failure into success using a sync or async fallback.Result< , provided by the AsyncResultOps extensionT, E> >