trait ZStreamChunk[-R, +E, +A] extends AnyRef
A ZStreamChunk[R, E, A]
represents an effectful stream that can produce values of
type A
, or potentially fail with a value of type E
.
ZStreamChunk
differs from ZStream
in that elements in the stream are processed
in batches, which is orders of magnitude more efficient than dealing with each
element individually.
ZStreamChunk
is particularly suited for situations where you are dealing with values
of primitive types, e.g. those coming off a java.io.InputStream
- Self Type
- ZStreamChunk[R, E, A]
- Alphabetic
- By Inheritance
- ZStreamChunk
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
++[R1 <: R, E1 >: E, A1 >: A](that: ZStreamChunk[R1, E1, A1]): ZStreamChunk[R1, E1, A1]
Concatenates with another stream in strict order
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
dropWhile(pred: (A) ⇒ Boolean): ZStreamChunk[R, E, A]
Drops all elements of the stream for as long as the specified predicate evaluates to
true
. -
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
filter(pred: (A) ⇒ Boolean): ZStreamChunk[R, E, A]
Filters this stream by the specified predicate, retaining all elements for which the predicate evaluates to true.
-
final
def
filterNot(pred: (A) ⇒ Boolean): ZStreamChunk[R, E, A]
Filters this stream by the specified predicate, removing all elements for which the predicate evaluates to true.
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
flatMap[R1 <: R, E1 >: E, B](f0: (A) ⇒ ZStreamChunk[R1, E1, B]): ZStreamChunk[R1, E1, B]
Returns a stream made of the concatenation in strict order of all the streams produced by passing each element of this stream to
f0
-
final
def
flattenChunks: ZStream[R, E, A]
Returns a stream made of the concatenation of all the chunks in this stream
-
final
def
fold[R1 <: R, E1 >: E, A1 >: A, S]: Fold[R1, E1, A1, S]
Executes an effectful fold over the stream of values.
-
final
def
foldChunks[R1 <: R, E1 >: E, A1 >: A, S](s: S)(cont: (S) ⇒ Boolean)(f: (S, Chunk[A1]) ⇒ ZIO[R1, E1, S]): ZManaged[R1, E1, S]
Executes an effectful fold over the stream of chunks.
-
def
foldLeft[A1 >: A, S](s: S)(f: (S, A1) ⇒ S): ZManaged[R, E, S]
Reduces the elements in the stream to a value of type
S
-
final
def
foreach[R1 <: R, E1 >: E](f: (A) ⇒ ZIO[R1, E1, Unit]): ZIO[R1, E1, Unit]
Consumes all elements of the stream, passing them to the specified callback.
-
final
def
foreachWhile[R1 <: R, E1 >: E](f: (A) ⇒ ZIO[R1, E1, Boolean]): ZIO[R1, E1, Unit]
Consumes elements of the stream, passing them to the specified callback, and terminating consumption when the callback returns
false
. -
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
map[B](f: (A) ⇒ B): ZStreamChunk[R, E, B]
Returns a stream made of the elements of this stream transformed with
f0
-
final
def
mapAccum[S1, B](s1: S1)(f1: (S1, A) ⇒ (S1, B)): ZStreamChunk[R, E, B]
Statefully maps over the elements of this stream to produce new elements.
-
def
mapConcat[B](f: (A) ⇒ Chunk[B]): ZStreamChunk[R, E, B]
Maps each element to a chunk, and flattens the chunks into the output of this stream.
-
final
def
mapM[R1 <: R, E1 >: E, B](f0: (A) ⇒ ZIO[R1, E1, B]): ZStreamChunk[R1, E1, B]
Maps over elements of the stream with the specified effectful function.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
run[R1 <: R, E1 >: E, A0, A1 >: A, B](sink: ZSink[R1, E1, A0, Chunk[A1], B]): ZIO[R1, E1, B]
Runs the sink on the stream to produce either the sink's result or an error.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
final
def
takeWhile(pred: (A) ⇒ Boolean): ZStreamChunk[R, E, A]
Takes all elements of the stream for as long as the specified predicate evaluates to
true
. -
final
def
tap[R1 <: R, E1 >: E](f0: (A) ⇒ ZIO[R1, E1, _]): ZStreamChunk[R1, E1, A]
Adds an effect to consumption of every element of the stream.
-
final
def
toQueue[E1 >: E, A1 >: A](capacity: Int = 2): ZManaged[R, E1, Queue[Take[E1, Chunk[A1]]]]
Converts the stream to a managed queue.
Converts the stream to a managed queue. After managed queue is used, the queue will never again produce chunks and should be discarded.
-
final
def
toQueueWith[R1 <: R, E1 >: E, A1 >: A, Z](f: (Queue[Take[E1, Chunk[A1]]]) ⇒ ZIO[R1, E1, Z], capacity: Int = 1): ZIO[R1, E1, Z]
Converts the stream to a managed queue and immediately consume its elements.
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
zipWithIndex: ZStreamChunk[R, E, (A, Int)]
Zips this stream together with the index of elements of the stream across chunks.