zio.stream

package zio.stream

Members list

Concise view

Type members

Classlikes

case object BuildInfo

This object was generated by sbt-buildinfo.

This object was generated by sbt-buildinfo.

Attributes

Graph
Supertypes
trait Singleton
trait Product
trait Mirror
trait Product
trait Equals
class Object
trait Matchable
class Any
Self type
trait SubscriptionRef[A] extends Synchronized[A]

A SubscriptionRef[A] is a Ref that can be subscribed to in order to receive the current value as well as all changes to the value.

A SubscriptionRef[A] is a Ref that can be subscribed to in order to receive the current value as well as all changes to the value.

Attributes

Companion:
object
Graph
Supertypes
class Synchronized[A]
class Ref[A]
class Object
trait Matchable
class Any

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
final case class Take[+E, +A](exit: Exit[Option[E], Chunk[A]]) extends AnyVal

A Take[E, A] represents a single take from a queue modeling a stream of values. A Take may be a failure cause Cause[E], an chunk value A or an end-of-stream marker.

A Take[E, A] represents a single take from a queue modeling a stream of values. A Take may be a failure cause Cause[E], an chunk value A or an end-of-stream marker.

Attributes

Companion:
object
Graph
Supertypes
trait Product
trait Equals
class AnyVal
trait Matchable
class Any
object Take

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Take.type
sealed trait ZChannel[-Env, -InErr, -InElem, -InDone, +OutErr, +OutElem, +OutDone]

A ZChannel[Env, InErr, InElem, InDone, OutErr, OutElem, OutDone] is a nexus of I/O operations, which supports both reading and writing. A channel may read values of type InElem or process upstream failures of type InErr, while it may write values of type OutElem. When the channel finishes, it yields a value of type OutDone. A channel may fail with a value of type OutErr.

A ZChannel[Env, InErr, InElem, InDone, OutErr, OutElem, OutDone] is a nexus of I/O operations, which supports both reading and writing. A channel may read values of type InElem or process upstream failures of type InErr, while it may write values of type OutElem. When the channel finishes, it yields a value of type OutDone. A channel may fail with a value of type OutErr.

Channels are the foundation of ZIO Streams: both streams and sinks are built on channels. Most users shouldn't have to use channels directly, as streams and sinks are much more convenient and cover all common use cases. However, when adding new stream and sink operators, or doing something highly specialized, it may be useful to use channels directly.

Channels compose in a variety of ways:

  • Piping. One channel can be piped to another channel, assuming the input type of the second is the same as the output type of the first.
  • Sequencing. The terminal value of one channel can be used to create another channel, and both the first channel and the function that makes the second channel can be composed into a channel.
  • Concating. The output of one channel can be used to create other channels, which are all concatenated together. The first channel and the function that makes the other channels can be composed into a channel.

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
ZChannel[Env, InErr, InElem, InDone, OutErr, OutElem, OutDone]
object ZChannel

Attributes

Companion:
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
final class ZPipeline[-Env, +Err, -In, +Out]

A ZPipeline[Env, Err, In, Out] is a polymorphic stream transformer. Pipelines accept a stream as input, and return the transformed stream as output.

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:

type ZPipeline[Env, Err, In, Out] = ZStream[Env, Err, In] => ZStream[Env, Err, Out]

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.

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
ZPipeline[Env, Err, In, Out]
object ZPipeline

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
final class ZSink[-R, +E, -In, +L, +Z] extends AnyVal

Attributes

Companion:
object
Graph
Supertypes
class AnyVal
trait Matchable
class Any
Self type
ZSink[R, E, In, L, Z]
object ZSink

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
ZSink.type
final class ZStream[-R, +E, +A]

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
ZStream[R, E, A]
object ZStream

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
ZStream.type
trait ZStreamAspect[+LowerR, -UpperR, +LowerE, -UpperE, +LowerA, -UpperA]

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
ZStreamAspect[LowerR, UpperR, LowerE, UpperE, LowerA, UpperA]

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
trait ZStreamVersionSpecific[-R, +E, +O]

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
ZStream[R, E, O]

Types

type Sink[+OutErr, -In, +L, +Z] = ZSink[Any, OutErr, In, L, Z]
type Stream[+E, +A] = ZStream[Any, E, A]
type UStream[+A] = ZStream[Any, Nothing, A]