final case class Take[+E, +A](exit: Exit[Option[E], Chunk[A]]) extends AnyVal with Product with Serializable
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.
- Alphabetic
- By Inheritance
- Take
- Serializable
- Serializable
- Product
- Equals
- AnyVal
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
##(): Int
- Definition Classes
- Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
done[R]: ZIO[R, Option[E], Chunk[A]]
Transforms
Take[E, A]
toZIO[R, E, B]
. - val exit: Exit[Option[E], Chunk[A]]
-
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.
-
def
foldZIO[R, E1, Z](end: ⇒ ZIO[R, E1, Z], error: (Cause[E]) ⇒ ZIO[R, E1, Z], value: (Chunk[A]) ⇒ ZIO[R, E1, Z]): 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.
-
def
getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
-
def
isDone: Boolean
Checks if this
take
is done (Take.end
). -
def
isFailure: Boolean
Checks if this
take
is a failure. -
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isSuccess: Boolean
Checks if this
take
is a success. -
def
map[B](f: (A) ⇒ B): Take[E, B]
Transforms
Take[E, A]
toTake[E, B]
by applying functionf
. -
def
tap[R, E1](f: (Chunk[A]) ⇒ ZIO[R, E1, Any]): ZIO[R, E1, Unit]
Returns an effect that effectfully "peeks" at the success of this take.
Deprecated Value Members
-
def
foldM[R, E1, Z](end: ⇒ ZIO[R, E1, Z], error: (Cause[E]) ⇒ ZIO[R, E1, Z], value: (Chunk[A]) ⇒ ZIO[R, E1, Z]): 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.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use foldZIO