chainStream<S2> method

ResStream<S2, F> chainStream<S2>(
  1. ResStream<S2, F> stream(
    1. S ok
    )
)

Switches to the result stream built from each success value.

This is switch-latest: each success cancels the current inner stream and listens to the new one, and a failure cancels it and is emitted. The output closes once this stream and the last inner stream have both closed. Each inner stream is an inner run (see Mallard).

Implementation

ResStream<S2, F> chainStream<S2>(ResStream<S2, F> Function(S ok) stream) =>
    ResStream._(
      _stream.chainStream(stream as t.ResultStream<S2, F> Function(S)),
    );