EffectTransformOps<A extends Object, E extends Object> extension

Transformations available on every Effect.

on

Methods

asUnit() Effect<Unit, E>

Available on Effect<A, E>, provided by the EffectTransformOps extension

Discard the success value while preserving the typed failure.
catchAll<F extends Object>(Effect<A, F> recover(E error)) Effect<A, F>

Available on Effect<A, E>, provided by the EffectTransformOps extension

Recover from every typed failure with another Effect.
either() Effect<ResultDart<A, E>, Never>

Available on Effect<A, E>, provided by the EffectTransformOps extension

Turn the typed failure channel into a successful Result value.
flatMap<B extends Object>(Effect<B, E> next(A value)) Effect<B, E>

Available on Effect<A, E>, provided by the EffectTransformOps extension

Sequence another Effect that uses this Effect's successful value.
map<B extends Object>(B transform(A value)) Effect<B, E>

Available on Effect<A, E>, provided by the EffectTransformOps extension

Transform the successful value.
mapError<F extends Object>(F transform(E error)) Effect<A, F>

Available on Effect<A, E>, provided by the EffectTransformOps extension

Transform the typed failure.
provide<T extends Object>(T instance, {ServiceKey<T>? key}) Effect<A, E>

Available on Effect<A, E>, provided by the EffectTransformOps extension

Run this Effect with a local service override.
tap(FutureOr<void> inspect(A value)) Effect<A, E>

Available on Effect<A, E>, provided by the EffectTransformOps extension

Run an observation after success without changing the value.
tapError(FutureOr<void> inspect(E error)) Effect<A, E>

Available on Effect<A, E>, provided by the EffectTransformOps extension

Run an observation after a typed failure without changing the failure.
timeout(Duration duration, {required E onTimeout()}) Effect<A, E>

Available on Effect<A, E>, provided by the EffectTransformOps extension

Fail with onTimeout when this Effect does not finish in time.
withLocal<T extends Object>(EffectLocal<T> local, T value) Effect<A, E>

Available on Effect<A, E>, provided by the EffectTransformOps extension

Run this Effect with a locally overridden EffectLocal value.
withLocals(Iterable<EffectLocalBinding> bindings) Effect<A, E>

Available on Effect<A, E>, provided by the EffectTransformOps extension

Apply a heterogeneous batch of typed EffectLocal values.