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
Source
Take.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class AnyVal
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

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

Source
Take.scala
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

Source
Take.scala

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

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

Attributes

Source
Take.scala

Checks if this take is a failure.

Checks if this take is a failure.

Attributes

Source
Take.scala

Checks if this take is a success.

Checks if this take is a success.

Attributes

Source
Take.scala
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

Source
Take.scala
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

Source
Take.scala

Deprecated 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

Deprecated
[Since version 2.1.14] use `exit` instead
Source
Take.scala

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product