SinkCompanionPlatformSpecific

zio.blocks.streams.SinkCompanionPlatformSpecific

Attributes

Source
SinkCompanionPlatformSpecific.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Sink

Members list

Value members

Concrete methods

def create[E, A, Z](f: SyncReader[A] => Z): Sink[E, A, Z]

Creates a JVM sink whose blocking callback receives the run's synchronous reader and decides how much input to consume and what result to produce. Returning early leaves the remaining input unread; the enclosing stream run closes that input rather than exposing it as reusable leftovers.

Creates a JVM sink whose blocking callback receives the run's synchronous reader and decides how much input to consume and what result to produce. Returning early leaves the remaining input unread; the enclosing stream run closes that input rather than exposing it as reusable leftovers.

The callback and reader are valid only for the run and must not be retained. Reader failures preserve the stream's typed error; callback exceptions are defects. At an asynchronous terminal, the callback runs on the blocking executor and cancellation closes the reader.

Attributes

Source
SinkCompanionPlatformSpecific.scala