Pipeline

zio.blocks.streams.Pipeline
See thePipeline companion object
abstract class Pipeline[-In, +Out]

A transformation from a Stream[_, In] to a Stream[_, Out]. Pipelines compose sequentially via andThen (with Pipeline.identity as the identity) and can be applied to Streams via applyToStream or to Sinks via applyToSink.

Type parameters

In

Input element type.

Out

Output element type.

Attributes

Companion
object
Source
Pipeline.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def applyToSink[E, Z](sink: Sink[E, Out, Z]): Sink[E, In, Z]

Returns a sink that transforms its input with this pipeline before passing it to sink. Construction is lazy and preserves sink's typed error and result types. Implementations must release the transformed reader, and therefore its upstream resources, on every exit.

Returns a sink that transforms its input with this pipeline before passing it to sink. Construction is lazy and preserves sink's typed error and result types. Implementations must release the transformed reader, and therefore its upstream resources, on every exit.

Attributes

Source
Pipeline.scala
def applyToStream[E](stream: Stream[E, In]): Stream[E, Out]

Returns the lazy stream obtained by applying this transformation to stream. The stream's typed error type is preserved; transformation callbacks cannot add typed errors. Resources and cancellation remain governed by the returned stream and its source.

Returns the lazy stream obtained by applying this transformation to stream. The stream's typed error type is preserved; transformation callbacks cannot add typed errors. Resources and cancellation remain governed by the returned stream and its source.

Attributes

Source
Pipeline.scala

Concrete methods

def andThen[C](that: Pipeline[Out, C]): Pipeline[In, C]

Composes this pipeline with that, applying this first and that to its output. Composition builds a lazy pipeline value; it does not run either pipeline or share per-run state. Pipeline.identity is the left and right identity.

Composes this pipeline with that, applying this first and that to its output. Composition builds a lazy pipeline value; it does not run either pipeline or share per-run state. Pipeline.identity is the left and right identity.

Attributes

Source
Pipeline.scala
def andThenSink[E, Z](sink: Sink[E, Out, Z]): Sink[E, In, Z]

Pre-composes this pipeline with sink. Running the returned sink is equivalent to transforming the input with this pipeline and then running sink; the sink's typed error and result types are unchanged. Derived readers are closed on completion, failure, or cancellation.

Pre-composes this pipeline with sink. Running the returned sink is equivalent to transforming the input with this pipeline and then running sink; the sink's typed error and result types are unchanged. Derived readers are closed on completion, failure, or cancellation.

This is an alias for applyToSink.

Attributes

Source
Pipeline.scala