captureSink<T> method

EventSink<T> captureSink <T>(EventSink<Result<T>> sink)

Captures the events of the returned sink into results on sink.

Data and error events added to the returned sink are captured into Result values and added as data events on the provided sink. No error events are ever added to sink.

When the returned sink is closed, so is sink.

Implementation

static EventSink<T> captureSink<T>(EventSink<Result<T>> sink) =>
    new CaptureSink<T>(sink);