FutureEither<L, R> extension

on

Properties

isLeft Future<bool>

Available on Future<Either<L, R>>, provided by the FutureEither extension

Represents the left side of Either class which by convention is a "Failure".
no setter
isRight Future<bool>

Available on Future<Either<L, R>>, provided by the FutureEither extension

Represents the right side of Either class which by convention is a "Success"
no setter

Methods

either<TL, TR>(TL fnL(L left), TR fnR(R right)) Future<Either<TL, TR>>

Available on Future<Either<L, R>>, provided by the FutureEither extension

Transform values of Left and Right
fold<T>(FutureOr<T> fnL(L left), FutureOr<T> fnR(R right)) Future<T>

Available on Future<Either<L, R>>, provided by the FutureEither extension

Fold Left and Right into the value of one type
mapLeft<TL>(FutureOr<TL> fnL(L left)) Future<Either<TL, R>>

Available on Future<Either<L, R>>, provided by the FutureEither extension

Transform value of Left
mapRight<TR>(FutureOr<TR> fnR(R right)) Future<Either<L, TR>>

Available on Future<Either<L, R>>, provided by the FutureEither extension

Transform value of Right
swap() Future<Either<R, L>>

Available on Future<Either<L, R>>, provided by the FutureEither extension

Swap Left and Right
thenLeft<TL>(FutureOr<Either<TL, R>> fnL(L left)) Future<Either<TL, R>>

Available on Future<Either<L, R>>, provided by the FutureEither extension

Async transform value of Left when transformation may be finished with an Right
thenRight<TR>(FutureOr<Either<L, TR>> fnR(R right)) Future<Either<L, TR>>

Available on Future<Either<L, R>>, provided by the FutureEither extension

Async transform value of Right when transformation may be finished with an error