Take

zio.stream.Take
See theTake companion object
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.

Attributes

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

Members list

Concise view

Value members

Concrete methods

def done[R](implicit trace: Trace): ZIO[R, Option[E], Chunk[A]]

Transforms Take[E, A] to ZIO[R, E, B].

Transforms Take[E, A] to ZIO[R, E, B].

Attributes

def fold[Z](end: => Z, error: Cause[E] => Z, value: Chunk[A] => Z): Z

Folds over the failure cause, success value and end-of-stream marker to yield a value.

Folds over the failure cause, success value and end-of-stream marker to yield a value.

Attributes

def foldZIO[R, E1, Z](end: => ZIO[R, E1, Z], error: Cause[E] => ZIO[R, E1, Z], value: Chunk[A] => ZIO[R, E1, Z])(implicit trace: Trace): ZIO[R, E1, Z]

Effectful version of Take#fold.

Effectful version of Take#fold.

Folds over the failure cause, success value and end-of-stream marker to yield an effect.

Attributes

Checks if this take is done (Take.end).

Checks if this take is done (Take.end).

Attributes

Checks if this take is a failure.

Checks if this take is a failure.

Attributes

Checks if this take is a success.

Checks if this take is a success.

Attributes

def map[B](f: A => B): Take[E, B]

Transforms Take[E, A] to Take[E, B] by applying function f.

Transforms Take[E, A] to Take[E, B] by applying function f.

Attributes

def tap[R, E1](f: Chunk[A] => ZIO[R, E1, Any])(implicit trace: Trace): ZIO[R, E1, Unit]

Returns an effect that effectfully "peeks" at the success of this take.

Returns an effect that effectfully "peeks" at the success of this take.

Attributes

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product