mobius-rx2/src/main/java/com/spotify/mobius/rx2/Transformers.java [58:135]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    return fromAction(doEffect, null);
  }

  /**
   * Creates an {@link ObservableTransformer} that will flatten the provided {@link Action} into the
   * stream as a {@link Completable} every time it receives an effect from the upstream effects
   * observable. This Completable will be subscribed on the specified {@link Scheduler}. This will
   * result in calling the provided Action on the specified scheduler every time an effect is
   * dispatched to the created effect transformer.
   *
   * @param doEffect the {@link Action} to be run every time the effect is requested
   * @param scheduler the {@link Scheduler} that the action should be run on
   * @param <F> the type of Effect this transformer handles
   * @param <E> these transformers are for effects that do not result in any events; however, they
   *     still need to share the same Event type
   * @return an {@link ObservableTransformer} that can be used with a {@link
   *     SubtypeEffectHandlerBuilder}.
   */
  static <F, E> ObservableTransformer<F, E> fromAction(
      final Action doEffect, @Nullable final Scheduler scheduler) {
    return new ObservableTransformer<F, E>() {
      @Override
      public ObservableSource<E> apply(Observable<F> effectStream) {
        return effectStream
            .flatMapCompletable(
                new Function<F, CompletableSource>() {
                  @Override
                  public CompletableSource apply(F f) throws Exception {
                    return scheduler == null
                        ? Completable.fromAction(doEffect)
                        : Completable.fromAction(doEffect).subscribeOn(scheduler);
                  }
                })
            .toObservable();
      }
    };
  }

  /**
   * Creates an {@link ObservableTransformer} that will flatten the provided {@link Consumer} into
   * the stream as a {@link Completable} every time it receives an effect from the upstream effects
   * observable. This will result in calling the consumer and and passing it the requested effect
   * object.
   *
   * @param doEffect the {@link Consumer} to be run every time the effect is requested
   * @param <F> the type of Effect this transformer handles
   * @param <E> these transformers are for effects that do not result in any events; however, they
   *     still need to share the same Event type
   * @return an {@link ObservableTransformer} that can be used with a {@link
   *     SubtypeEffectHandlerBuilder}.
   */
  static <F, E> ObservableTransformer<F, E> fromConsumer(final Consumer<F> doEffect) {
    return fromConsumer(doEffect, null);
  }

  /**
   * Creates an {@link ObservableTransformer} that will flatten the provided {@link Consumer} into
   * the stream as a {@link Completable} every time it receives an effect from the upstream effects
   * observable. This will result in calling the consumer on the specified scheduler, and passing it
   * the requested effect object.
   *
   * @param doEffect the {@link Consumer} to be run every time the effect is requested
   * @param scheduler the {@link Scheduler} to be used when invoking the consumer
   * @param <F> the type of Effect this transformer handles
   * @param <E> these transformers are for effects that do not result in any events; however, they
   *     still need to share the same Event type
   * @return an {@link ObservableTransformer} that can be used with a {@link
   *     SubtypeEffectHandlerBuilder}.
   */
  static <F, E> ObservableTransformer<F, E> fromConsumer(
      final Consumer<F> doEffect, @Nullable final Scheduler scheduler) {
    return new ObservableTransformer<F, E>() {
      @Override
      public ObservableSource<E> apply(Observable<F> effectStream) {
        return effectStream
            .flatMapCompletable(
                new Function<F, CompletableSource>() {
                  @Override
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



mobius-rx3/src/main/java/com/spotify/mobius/rx3/Transformers.java [54:131]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    return fromAction(doEffect, null);
  }

  /**
   * Creates an {@link ObservableTransformer} that will flatten the provided {@link Action} into the
   * stream as a {@link Completable} every time it receives an effect from the upstream effects
   * observable. This Completable will be subscribed on the specified {@link Scheduler}. This will
   * result in calling the provided Action on the specified scheduler every time an effect is
   * dispatched to the created effect transformer.
   *
   * @param doEffect the {@link Action} to be run every time the effect is requested
   * @param scheduler the {@link Scheduler} that the action should be run on
   * @param <F> the type of Effect this transformer handles
   * @param <E> these transformers are for effects that do not result in any events; however, they
   *     still need to share the same Event type
   * @return an {@link ObservableTransformer} that can be used with a {@link
   *     RxMobius.SubtypeEffectHandlerBuilder}.
   */
  static <F, E> ObservableTransformer<F, E> fromAction(
      final Action doEffect, @Nullable final Scheduler scheduler) {
    return new ObservableTransformer<F, E>() {
      @Override
      public ObservableSource<E> apply(Observable<F> effectStream) {
        return effectStream
            .flatMapCompletable(
                new Function<F, CompletableSource>() {
                  @Override
                  public CompletableSource apply(F f) throws Exception {
                    return scheduler == null
                        ? Completable.fromAction(doEffect)
                        : Completable.fromAction(doEffect).subscribeOn(scheduler);
                  }
                })
            .toObservable();
      }
    };
  }

  /**
   * Creates an {@link ObservableTransformer} that will flatten the provided {@link Consumer} into
   * the stream as a {@link Completable} every time it receives an effect from the upstream effects
   * observable. This will result in calling the consumer and and passing it the requested effect
   * object.
   *
   * @param doEffect the {@link Consumer} to be run every time the effect is requested
   * @param <F> the type of Effect this transformer handles
   * @param <E> these transformers are for effects that do not result in any events; however, they
   *     still need to share the same Event type
   * @return an {@link ObservableTransformer} that can be used with a {@link
   *     RxMobius.SubtypeEffectHandlerBuilder}.
   */
  static <F, E> ObservableTransformer<F, E> fromConsumer(final Consumer<F> doEffect) {
    return fromConsumer(doEffect, null);
  }

  /**
   * Creates an {@link ObservableTransformer} that will flatten the provided {@link Consumer} into
   * the stream as a {@link Completable} every time it receives an effect from the upstream effects
   * observable. This will result in calling the consumer on the specified scheduler, and passing it
   * the requested effect object.
   *
   * @param doEffect the {@link Consumer} to be run every time the effect is requested
   * @param scheduler the {@link Scheduler} to be used when invoking the consumer
   * @param <F> the type of Effect this transformer handles
   * @param <E> these transformers are for effects that do not result in any events; however, they
   *     still need to share the same Event type
   * @return an {@link ObservableTransformer} that can be used with a {@link
   *     RxMobius.SubtypeEffectHandlerBuilder}.
   */
  static <F, E> ObservableTransformer<F, E> fromConsumer(
      final Consumer<F> doEffect, @Nullable final Scheduler scheduler) {
    return new ObservableTransformer<F, E>() {
      @Override
      public ObservableSource<E> apply(Observable<F> effectStream) {
        return effectStream
            .flatMapCompletable(
                new Function<F, CompletableSource>() {
                  @Override
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



