StreamEitherX<L, R> extension

Stream Either Extension

on

Properties

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

Methods

castEither<F, S>() Stream<Either<F, S>>
Future Cast to new Left & Right type
either({required EitherCallback<L> onLeft, required EitherCallback<R> onRight}) Future<void>
Future on Stream Either type result on Callback
mapEither({required MapCallback<L> onLeft, required MapCallback<R> onRight}) Stream<Either<L, R>>
Return the Stream Either result in one of these functions.
maybeWhenEither<T>({WhenCallback<T, L>? onLeft, WhenCallback<T, R>? onRight, required MaybeCallback<T> orElse}) Stream<T>
The maybeWhenEither method is equivalent to whenEither, but doesn't require all callbacks to be specified. On the other hand, it adds an extra orElse required parameter, for fallback behavior.
swapEither() Stream<Either<R, L>>
Future Swap Left and Right
whenEither<T>({required WhenCallback<T, L> onLeft, required WhenCallback<T, R> onRight}) Stream<T>
Return the Stream result in one of these functions.