FutureEither<L, R> extension

on

Properties

isLeft Future<bool>
Represents the left side of Either class which by convention is a "Failure".
no setter
isRight Future<bool>
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>>
Transform values of Left and Right
fold<T>(FutureOr<T> fnL(L left), FutureOr<T> fnR(R right)) Future<T>
Fold Left and Right into the value of one type
mapLeft<TL>(FutureOr<TL> fnL(L left)) Future<Either<TL, R>>
Transform value of Left
mapRight<TR>(FutureOr<TR> fnR(R right)) Future<Either<L, TR>>
Transform value of Right
swap() Future<Either<R, L>>
Swap Left and Right
thenLeft<TL>(FutureOr<Either<TL, R>> fnL(L left)) Future<Either<TL, R>>
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>>
Async transform value of Right when transformation may be finished with an error