Create a Sink
from a Subscriber
.
Create a Sink
from a Subscriber
. Errors need to be transported via the returned Promise:
val subscriber: Subscriber[Int] = ???
val stream: Stream[Any, Throwable, Int] = ???
subscriber.toSink.use { case (error, sink) =>
stream.run(sink).catchAll(e => error.fail(e))
}