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 map.
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 counts the number of elements fed to it.
Creates a sink halting with the specified Throwable
.
Creates a sink halting with the specified message, wrapped in a
RuntimeException
.
A sink that ignores its inputs.
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 input chunks 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 effectfully folds its input chunks with the provided function, termination predicate and initial state.
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 input chunks 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 effectfully folds its input chunks with the provided function and initial state.
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, 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 chunk fed to it.
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
Uses the provided Path
to create a ZSink that consumes byte chunks
and writes them to the File
.
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.
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.
Uses the provided OutputStream
to create a ZSink that consumes byte chunks
and writes them to the OutputStream
.
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
.
Uses the provided OutputStream
resource to create a ZSink that consumes byte chunks
and writes them to the OutputStream
.
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.
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.
Creates a sink halting with a specified cause.
Creates a sink containing the first value.
Creates a sink containing the last value.
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 sums incoming numeric values.
A sink that takes the specified number of values.
A sink with timed execution.