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.
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- Take
- Serializable
- Product
- Equals
- AnyVal
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
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
- 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])(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.
- 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 productElementNames: Iterator[String]
- Definition Classes
- Product
- 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.