class
ZPipeline[-Env, +Err, -In, +Out] extends AnyRef
Instance Constructors
-
Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
<<<[Env1 <: Env, Err1 >: Err, In2](that: ⇒ ZPipeline[Env1, Err1, In2, In])(implicit trace: ZTraceElement): ZPipeline[Env1, Err1, In2, Out]
-
final
def
==(arg0: Any): Boolean
-
final
def
>>>[Env1 <: Env, Err1 >: Err, Leftover, Out2](that: ⇒ ZSink[Env1, Err1, Out, Leftover, Out2])(implicit trace: ZTraceElement): ZSink[Env1, Err1, In, Leftover, Out2]
-
final
def
>>>[Env1 <: Env, Err1 >: Err, Out2](that: ⇒ ZPipeline[Env1, Err1, Out, Out2])(implicit trace: ZTraceElement): ZPipeline[Env1, Err1, In, Out2]
-
final
def
andThen[Env1 <: Env, Err1 >: Err, Out2](that: ⇒ ZPipeline[Env1, Err1, Out, Out2])(implicit trace: ZTraceElement): ZPipeline[Env1, Err1, In, Out2]
-
final
def
apply[Env1 <: Env, Err1 >: Err](stream: ⇒ ZStream[Env1, Err1, In])(implicit trace: ZTraceElement): ZStream[Env1, Err1, Out]
-
final
def
asInstanceOf[T0]: T0
-
-
def
clone(): AnyRef
-
final
def
compose[Env1 <: Env, Err1 >: Err, In2](that: ⇒ ZPipeline[Env1, Err1, In2, In])(implicit trace: ZTraceElement): ZPipeline[Env1, Err1, In2, Out]
-
-
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
A
ZPipeline[Env, Err, In, Out]
is a polymorphic stream transformer. Pipelines accept a stream as input, and return the transformed stream as output.Pipelines can be thought of as a recipe for calling a bunch of methods on a source stream, to yield a new (transformed) stream. A nice mental model is the following type alias:
This encoding of a pipeline with a type alias is not used because it does not infer well. In its place, this trait captures the polymorphism inherent to many pipelines, which can therefore be more flexible about the environment and error types of the streams they transform.
There is no fundamental requirement for pipelines to exist, because everything pipelines do can be done directly on a stream. However, because pipelines separate the stream transformation from the source stream itself, it becomes possible to abstract over stream transformations at the level of values, creating, storing, and passing around reusable transformation pipelines that can be applied to many different streams.
The most common way to create a pipeline is to convert a sink into a pipeline (in general, transforming elements of a stream requires the power of a sink). However, the companion object has lots of other pipeline constructors based on the methods of stream.