captureStream<T> static method

Stream<Result<T>> captureStream<T>(
  1. Stream<T> source
)

Captures the results of a stream into a stream of Result values.

The returned stream will not have any error events. Errors from the source stream have been converted to ErrorResults.

Implementation

static Stream<Result<T>> captureStream<T>(Stream<T> source) =>
    source.transform(CaptureStreamTransformer<T>());