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.

trait ZIO[R, Option[E], Chunk[A]] => B
class Object
trait Matchable
class Any

Value members

Abstract methods

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

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.

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.

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.

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.

def end(implicit trace: Trace): B

Terminates with an end of stream signal.

Terminates with an end of stream signal.

def fail(e: E)(implicit trace: Trace): B

Terminates with the specified error.

Terminates with the specified error.

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.

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.

def halt(cause: Cause[E])(implicit trace: Trace): B

Terminates the stream with the specified cause.

Terminates the stream with the specified cause.

def single(a: A)(implicit trace: Trace): B

Emits a chunk containing the specified value.

Emits a chunk containing the specified value.

Inherited methods

def andThen[A](g: B => A): T1 => A
Inherited from:
Function1
def compose[A](g: A => ZIO[R, Option[E], Chunk[A]]): A => R
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.

Returns:

a string representation of the object.

Definition Classes
Function1 -> Any
Inherited from:
Function1