Emit

zio.stream.ZStream.Emit
trait Emit[+R, -E, -A, +B] extends (ZIO[R, Option[E], Chunk[A]]) => B

An Emit[R, E, A, B] represents an asynchronous callback that can be called multiple times. The callback can be called with a value of type ZIO[R, Option[E], Chunk[A]], where succeeding with a Chunk[A] indicates to emit those elements, failing with Some[E] indicates to terminate with that error, and failing with None indicates to terminate with an end of stream signal.

Attributes

Source
ZStream.scala
Graph
Supertypes
trait (ZIO[R, Option[E], Chunk[A]]) => B
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def apply(v1: ZIO[R, Option[E], Chunk[A]]): B

Attributes

Source
ZStream.scala

Concrete methods

def chunk(as: Chunk[A])(implicit trace: Trace): B

Emits a chunk containing the specified values.

Emits a chunk containing the specified values.

Attributes

Source
ZStream.scala
def die(t: Throwable)(implicit trace: Trace): B

Terminates with a cause that dies with the specified Throwable.

Terminates with a cause that dies with the specified Throwable.

Attributes

Source
ZStream.scala
def dieMessage(message: String)(implicit trace: Trace): B

Terminates with a cause that dies with a Throwable with the specified message.

Terminates with a cause that dies with a Throwable with the specified message.

Attributes

Source
ZStream.scala
def done(exit: Exit[E, A])(implicit trace: Trace): B

Either emits the specified value if this Exit is a Success or else terminates with the specified cause if this Exit is a Failure.

Either emits the specified value if this Exit is a Success or else terminates with the specified cause if this Exit is a Failure.

Attributes

Source
ZStream.scala
def end(implicit trace: Trace): B

Terminates with an end of stream signal.

Terminates with an end of stream signal.

Attributes

Source
ZStream.scala
def fail(e: E)(implicit trace: Trace): B

Terminates with the specified error.

Terminates with the specified error.

Attributes

Source
ZStream.scala
def fromEffect(zio: ZIO[R, E, A])(implicit trace: Trace): B

Either emits the success value of this effect or terminates the stream with the failure value of this effect.

Either emits the success value of this effect or terminates the stream with the failure value of this effect.

Attributes

Source
ZStream.scala
def fromEffectChunk(zio: ZIO[R, E, Chunk[A]])(implicit trace: Trace): B

Either emits the success value of this effect or terminates the stream with the failure value of this effect.

Either emits the success value of this effect or terminates the stream with the failure value of this effect.

Attributes

Source
ZStream.scala
def halt(cause: Cause[E])(implicit trace: Trace): B

Terminates the stream with the specified cause.

Terminates the stream with the specified cause.

Attributes

Source
ZStream.scala
def single(a: A)(implicit trace: Trace): B

Emits a chunk containing the specified value.

Emits a chunk containing the specified value.

Attributes

Source
ZStream.scala

Inherited methods

def andThen[A](g: B => A): ZIO[R, Option[E], Chunk[A]] => A

Attributes

Inherited from:
Function1
def compose[A](g: A => ZIO[R, Option[E], Chunk[A]]): A => B

Attributes

Inherited from:
Function1
override def toString(): String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Function1 -> Any
Inherited from:
Function1