- Companion:
- class
Type members
Value members
Concrete methods
Accesses the environment of the sink in the context of a sink.
Accesses the environment of the sink in the context of a sink.
A sink that collects all of its inputs into a chunk.
A sink that collects all of its inputs into a chunk.
A sink that collects all of its inputs into a map. The keys are extracted
from inputs using the keying function key
; if multiple inputs use the
same key, they are merged using the f
function.
A sink that collects all of its inputs into a map. The keys are extracted
from inputs using the keying function key
; if multiple inputs use the
same key, they are merged using the f
function.
A sink that collects all of its inputs into a set.
A sink that collects all of its inputs into a set.
Creates a sink halting with the specified Throwable
.
Creates a sink halting with the specified Throwable
.
Creates a sink halting with the specified message, wrapped in a
RuntimeException
.
Creates a sink halting with the specified message, wrapped in a
RuntimeException
.
A sink that always fails with the specified error.
A sink that always fails with the specified error.
A sink that folds its inputs with the provided function, termination predicate and initial state.
A sink that folds its inputs with the provided function, termination predicate and initial state.
A sink that folds its input chunks with the provided function, termination
predicate and initial state. contFn
condition is checked only for the
initial value and at the end of processing of each chunk. f
and contFn
must preserve chunking-invariance.
A sink that folds its input chunks with the provided function, termination
predicate and initial state. contFn
condition is checked only for the
initial value and at the end of processing of each chunk. f
and contFn
must preserve chunking-invariance.
A sink that effectfully folds its input chunks with the provided function,
termination predicate and initial state. contFn
condition is checked only
for the initial value and at the end of processing of each chunk. f
and
contFn
must preserve chunking-invariance.
A sink that effectfully folds its input chunks with the provided function,
termination predicate and initial state. contFn
condition is checked only
for the initial value and at the end of processing of each chunk. f
and
contFn
must preserve chunking-invariance.
A sink that folds its inputs with the provided function and initial state.
A sink that folds its inputs with the provided function and initial state.
A sink that folds its input chunks with the provided function and initial
state. f
must preserve chunking-invariance.
A sink that folds its input chunks with the provided function and initial
state. f
must preserve chunking-invariance.
A sink that effectfully folds its input chunks with the provided function
and initial state. f
must preserve chunking-invariance.
A sink that effectfully folds its input chunks with the provided function
and initial state. f
must preserve chunking-invariance.
A sink that effectfully folds its inputs with the provided function and initial state.
A sink that effectfully folds its inputs with the provided function and initial state.
A sink that effectfully folds its inputs with the provided function, termination predicate and initial state.
A sink that effectfully folds its inputs with the provided function, termination predicate and initial state.
This sink may terminate in the middle of a chunk and discard the rest of it. See the discussion on the ZSink class scaladoc on sinks vs. transducers.
A sink that executes the provided effectful function for every element fed to it.
A sink that executes the provided effectful function for every element fed to it.
A sink that executes the provided effectful function for every chunk fed to it.
A sink that executes the provided effectful function for every chunk fed to it.
A sink that executes the provided effectful function for every element fed
to it until f
evaluates to false
.
A sink that executes the provided effectful function for every element fed
to it until f
evaluates to false
.
Creates a single-value sink produced from an effect
Creates a single-value sink produced from an effect
Create a sink which publishes each element to the specified hub.
Create a sink which publishes each element to the specified hub.
Create a sink which publishes each element to the specified hub. The hub will be shutdown once the stream is closed.
Create a sink which publishes each element to the specified hub. The hub will be shutdown once the stream is closed.
Create a sink which enqueues each element into the specified queue.
Create a sink which enqueues each element into the specified queue.
Create a sink which enqueues each element into the specified queue. The queue will be shutdown once the stream is closed.
Create a sink which enqueues each element into the specified queue. The queue will be shutdown once the stream is closed.
A sink that depends on another managed value resource
will be finalized
after the processing.
A sink that depends on another managed value resource
will be finalized
after the processing.
A sink that immediately ends with the specified value.
A sink that immediately ends with the specified value.
Inherited methods
Creates a sink which digests incoming bytes using Java's MessageDigest class, returning in a single byte chunk with the digest value once the stream completes.
Creates a sink which digests incoming bytes using Java's MessageDigest class, returning in a single byte chunk with the digest value once the stream completes.
- Value parameters:
- createDigest
A block that creates an empty MessageDirect, typically by invoking MessageDigest.getInstance with e.g. "SHA-1" or "SHA-256".
- Inherited from:
- ZSinkPlatformSpecificConstructors
Uses the provided Path
to create a ZSink that consumes byte chunks
and writes them to the File
. The sink will yield count of bytes written.
Uses the provided Path
to create a ZSink that consumes byte chunks
and writes them to the File
. The sink will yield count of bytes written.
- Inherited from:
- ZSinkPlatformSpecificConstructors
Uses the provided OutputStream
to create a ZSink that consumes byte
chunks and writes them to the OutputStream
. The sink will yield the count
of bytes written.
Uses the provided OutputStream
to create a ZSink that consumes byte
chunks and writes them to the OutputStream
. The sink will yield the count
of bytes written.
The caller of this function is responsible for closing the OutputStream
.
- Inherited from:
- ZSinkPlatformSpecificConstructors
Uses the provided OutputStream
resource to create a ZSink that
consumes byte chunks and writes them to the OutputStream
. The sink will
yield the count of bytes written.
Uses the provided OutputStream
resource to create a ZSink that
consumes byte chunks and writes them to the OutputStream
. The sink will
yield the count of bytes written.
The OutputStream
will be automatically closed after the stream is
finished or an error occurred.
- Inherited from:
- ZSinkPlatformSpecificConstructors