ZStream

Companion:
class
class Object
trait Matchable
class Any
ZStream.type

Type members

Classlikes

final class AccessMPartiallyApplied[R](dummy: Boolean) extends AnyVal
final class AccessPartiallyApplied[R](dummy: Boolean) extends AnyVal
final class AccessStreamPartiallyApplied[R](dummy: Boolean) extends AnyVal
trait Emit[+R, -E, -A, +B] extends ZIO[R, Option[E], Chunk[A]] => B

An Emit[R, E, A, B] represents an asynchronous callback that can be called multiple times. The callback can be called with a value of type ZIO[R, Option[E], Chunk[A]], where succeeding with a Chunk[A] indicates to emit those elements, failing with Some[E] indicates to terminate with that error, and failing with None indicates to terminate with an end of stream signal.

An Emit[R, E, A, B] represents an asynchronous callback that can be called multiple times. The callback can be called with a value of type ZIO[R, Option[E], Chunk[A]], where succeeding with a Chunk[A] indicates to emit those elements, failing with Some[E] indicates to terminate with that error, and failing with None indicates to terminate with an end of stream signal.

final class GroupBy[-R, +E, +K, +V](grouped: ZStream[R, E, (K, Dequeue[Exit[Option[E], V]])], buffer: Int)

Representation of a grouped stream. This allows to filter which groups will be processed. Once this is applied all groups will be processed in parallel and the results will be merged in arbitrary order.

Representation of a grouped stream. This allows to filter which groups will be processed. Once this is applied all groups will be processed in parallel and the results will be merged in arbitrary order.

final class ProvideSomeLayer[R0 <: Has[_], -R, +E, +A](self: ZStream[R, E, A]) extends AnyVal
final implicit class RefineToOrDieOps[R, E <: Throwable, A](self: ZStream[R, E, A]) extends AnyVal
final class ServiceWithPartiallyApplied[Service](dummy: Boolean) extends AnyVal
final class ServiceWithStreamPartiallyApplied[Service](dummy: Boolean) extends AnyVal
final implicit class SortedByKey[R, E, K, A](self: ZStream[R, E, (K, A)])

Provides extension methods for streams that are sorted by distinct keys.

Provides extension methods for streams that are sorted by distinct keys.

final implicit class SyntaxOps[-R, +E, O](self: ZStream[R, E, O])
object Take
Companion:
class
sealed trait TerminationStrategy
Companion:
object
final class UpdateService[-R, +E, +O, M](self: ZStream[R, E, O]) extends AnyVal
final class WhenCaseM[R, E, A](a: ZIO[R, E, A]) extends AnyVal
final class WhenM[R, E](b: ZIO[R, E, Boolean]) extends AnyVal

Types

type Pull[-R, +E, +O] = ZIO[R, Option[E], Chunk[O]]

Deprecated types

@deprecated("use zio.stream.Take instead", "1.0.0")
type Take[+E, +A] = Exit[Option[E], Chunk[A]]
Deprecated

Value members

Concrete methods

def absolve[R, E, O](xs: ZStream[R, E, Either[E, O]]): ZStream[R, E, O]

Submerges the error case of an Either into the ZStream.

Submerges the error case of an Either into the ZStream.

Accesses the environment of the stream.

Accesses the environment of the stream.

Accesses the environment of the stream in the context of an effect.

Accesses the environment of the stream in the context of an effect.

Accesses the environment of the stream in the context of a stream.

Accesses the environment of the stream in the context of a stream.

def apply[R, E, O](process: ZManaged[R, Nothing, ZIO[R, Option[E], Chunk[O]]]): ZStream[R, E, O]

Creates a new ZStream from a managed effect that yields chunks. The effect will be evaluated repeatedly until it fails with a None (to signify stream end) or a Some(E) (to signify stream failure).

Creates a new ZStream from a managed effect that yields chunks. The effect will be evaluated repeatedly until it fails with a None (to signify stream end) or a Some(E) (to signify stream failure).

The stream evaluation guarantees proper acquisition and release of the ZManaged.

def apply[A](as: A*): ZStream[Any, Nothing, A]

Creates a pure stream from a variable list of values

Creates a pure stream from a variable list of values

def bracket[R, E, A](acquire: ZIO[R, E, A])(release: A => URIO[R, Any]): ZStream[R, E, A]

Creates a stream from a single value that will get cleaned up after the stream is consumed

Creates a stream from a single value that will get cleaned up after the stream is consumed

def bracketExit[R, E, A](acquire: ZIO[R, E, A])(release: (A, Exit[Any, Any]) => URIO[R, Any]): ZStream[R, E, A]

Creates a stream from a single value that will get cleaned up after the stream is consumed

Creates a stream from a single value that will get cleaned up after the stream is consumed

def concatAll[R, E, O](streams: Chunk[ZStream[R, E, O]]): ZStream[R, E, O]

Concatenates all of the streams in the chunk to one stream.

Concatenates all of the streams in the chunk to one stream.

def crossN[R, E, A, B, C](zStream1: ZStream[R, E, A], zStream2: ZStream[R, E, B])(f: (A, B) => C): ZStream[R, E, C]

Composes the specified streams to create a cartesian product of elements with a specified function. Subsequent streams would be run multiple times, for every combination of elements in the prior streams.

Composes the specified streams to create a cartesian product of elements with a specified function. Subsequent streams would be run multiple times, for every combination of elements in the prior streams.

See also ZStream#zipN for the more common point-wise variant.

def crossN[R, E, A, B, C, D](zStream1: ZStream[R, E, A], zStream2: ZStream[R, E, B], zStream3: ZStream[R, E, C])(f: (A, B, C) => D): ZStream[R, E, D]

Composes the specified streams to create a cartesian product of elements with a specified function. Subsequent stream would be run multiple times, for every combination of elements in the prior streams.

Composes the specified streams to create a cartesian product of elements with a specified function. Subsequent stream would be run multiple times, for every combination of elements in the prior streams.

See also ZStream#zipN for the more common point-wise variant.

def crossN[R, E, A, B, C, D, F](zStream1: ZStream[R, E, A], zStream2: ZStream[R, E, B], zStream3: ZStream[R, E, C], zStream4: ZStream[R, E, D])(f: (A, B, C, D) => F): ZStream[R, E, F]

Composes the specified streams to create a cartesian product of elements with a specified function. Subsequent stream would be run multiple times, for every combination of elements in the prior streams.

Composes the specified streams to create a cartesian product of elements with a specified function. Subsequent stream would be run multiple times, for every combination of elements in the prior streams.

See also ZStream#zipN for the more common point-wise variant.

def die(ex: => Throwable): ZStream[Any, Nothing, Nothing]

The stream that dies with the ex.

The stream that dies with the ex.

def dieMessage(msg: => String): ZStream[Any, Nothing, Nothing]

The stream that dies with an exception described by msg.

The stream that dies with an exception described by msg.

def done[E, A](exit: Exit[E, A]): ZStream[Any, E, A]

The stream that ends with the zio.Exit value exit.

The stream that ends with the zio.Exit value exit.

def environment[R]: ZStream[R, Nothing, R]

Accesses the whole environment of the stream.

Accesses the whole environment of the stream.

def execute[R, E, A](zio: ZIO[R, E, A]): ZStream[R, E, Nothing]

Creates a zio.stream.ZStream from the given effect and drains it

Creates a zio.stream.ZStream from the given effect and drains it

def fail[E](error: => E): ZStream[Any, E, Nothing]

The stream that always fails with the error

The stream that always fails with the error

def finalizer[R](finalizer: URIO[R, Any]): ZStream[R, Nothing, Any]

Creates a one-element stream that never fails and executes the finalizer when it ends.

Creates a one-element stream that never fails and executes the finalizer when it ends.

def fromChunk[O](c: => Chunk[O]): ZStream[Any, Nothing, O]

Creates a stream from a zio.Chunk of values

Creates a stream from a zio.Chunk of values

Value parameters:
c

a chunk of values

Returns:

a finite stream of values

def fromChunkHub[R, E, O](hub: ZHub[Nothing, R, Any, E, Nothing, Chunk[O]]): ZStream[R, E, O]

Creates a stream from a subscription to a hub.

Creates a stream from a subscription to a hub.

def fromChunkHubManaged[R, E, O](hub: ZHub[Nothing, R, Any, E, Nothing, Chunk[O]]): ZManaged[Any, Nothing, ZStream[R, E, O]]

Creates a stream from a subscription to a hub in the context of a managed effect. The managed effect describes subscribing to receive messages from the hub while the stream describes taking messages from the hub.

Creates a stream from a subscription to a hub in the context of a managed effect. The managed effect describes subscribing to receive messages from the hub while the stream describes taking messages from the hub.

def fromChunkHubManagedWithShutdown[R, E, O](hub: ZHub[Nothing, R, Any, E, Nothing, Chunk[O]]): ZManaged[Any, Nothing, ZStream[R, E, O]]

Creates a stream from a subscription to a hub in the context of a managed effect. The managed effect describes subscribing to receive messages from the hub while the stream describes taking messages from the hub.

Creates a stream from a subscription to a hub in the context of a managed effect. The managed effect describes subscribing to receive messages from the hub while the stream describes taking messages from the hub.

The hub will be shut down once the stream is closed.

def fromChunkHubWithShutdown[R, E, O](hub: ZHub[Nothing, R, Any, E, Nothing, Chunk[O]]): ZStream[R, E, O]

Creates a stream from a subscription to a hub.

Creates a stream from a subscription to a hub.

The hub will be shut down once the stream is closed.

def fromChunkQueue[R, E, O](queue: ZQueue[Nothing, R, Any, E, Nothing, Chunk[O]]): ZStream[R, E, O]

Creates a stream from a zio.ZQueue of values

Creates a stream from a zio.ZQueue of values

def fromChunkQueueWithShutdown[R, E, O](queue: ZQueue[Nothing, R, Any, E, Nothing, Chunk[O]]): ZStream[R, E, O]

Creates a stream from a zio.ZQueue of values. The queue will be shutdown once the stream is closed.

Creates a stream from a zio.ZQueue of values. The queue will be shutdown once the stream is closed.

def fromChunks[O](cs: Chunk[O]*): ZStream[Any, Nothing, O]

Creates a stream from an arbitrary number of chunks.

Creates a stream from an arbitrary number of chunks.

def fromEffect[R, E, A](fa: ZIO[R, E, A]): ZStream[R, E, A]

Creates a stream from an effect producing a value of type A

Creates a stream from an effect producing a value of type A

def fromEffectOption[R, E, A](fa: ZIO[R, Option[E], A]): ZStream[R, E, A]

Creates a stream from an effect producing a value of type A or an empty Stream

Creates a stream from an effect producing a value of type A or an empty Stream

def fromHub[R, E, A](hub: ZHub[Nothing, R, Any, E, Nothing, A], maxChunkSize: Int): ZStream[R, E, A]

Creates a stream from a subscription to a hub.

Creates a stream from a subscription to a hub.

def fromHubManaged[R, E, A](hub: ZHub[Nothing, R, Any, E, Nothing, A], maxChunkSize: Int): ZManaged[Any, Nothing, ZStream[R, E, A]]

Creates a stream from a subscription to a hub in the context of a managed effect. The managed effect describes subscribing to receive messages from the hub while the stream describes taking messages from the hub.

Creates a stream from a subscription to a hub in the context of a managed effect. The managed effect describes subscribing to receive messages from the hub while the stream describes taking messages from the hub.

def fromHubManagedWithShutdown[R, E, A](hub: ZHub[Nothing, R, Any, E, Nothing, A], maxChunkSize: Int): ZManaged[Any, Nothing, ZStream[R, E, A]]

Creates a stream from a subscription to a hub in the context of a managed effect. The managed effect describes subscribing to receive messages from the hub while the stream describes taking messages from the hub.

Creates a stream from a subscription to a hub in the context of a managed effect. The managed effect describes subscribing to receive messages from the hub while the stream describes taking messages from the hub.

The hub will be shut down once the stream is closed.

def fromHubWithShutdown[R, E, A](hub: ZHub[Nothing, R, Any, E, Nothing, A], maxChunkSize: Int): ZStream[R, E, A]

Creates a stream from a subscription to a hub.

Creates a stream from a subscription to a hub.

The hub will be shut down once the stream is closed.

def fromIterable[O](as: => Iterable[O]): ZStream[Any, Nothing, O]

Creates a stream from an iterable collection of values

Creates a stream from an iterable collection of values

def fromIterableM[R, E, O](iterable: ZIO[R, E, Iterable[O]]): ZStream[R, E, O]

Creates a stream from an effect producing a value of type Iterable[A]

Creates a stream from an effect producing a value of type Iterable[A]

def fromIterator[A](iterator: => Iterator[A], maxChunkSize: Int): ZStream[Any, Throwable, A]

Creates a stream from an iterator that may throw exceptions.

Creates a stream from an iterator that may throw exceptions.

def fromIteratorEffect[R, A](iterator: ZIO[R, Throwable, Iterator[A]]): ZStream[R, Throwable, A]

Creates a stream from an iterator that may potentially throw exceptions

Creates a stream from an iterator that may potentially throw exceptions

def fromIteratorManaged[R, A](iterator: ZManaged[R, Throwable, Iterator[A]]): ZStream[R, Throwable, A]

Creates a stream from a managed iterator

Creates a stream from a managed iterator

def fromIteratorTotal[A](iterator: => Iterator[A], maxChunkSize: Int): ZStream[Any, Nothing, A]

Creates a stream from an iterator that does not throw exceptions.

Creates a stream from an iterator that does not throw exceptions.

def fromJavaIterator[A](iterator: => Iterator[A]): ZStream[Any, Throwable, A]

Creates a stream from a Java iterator that may throw exceptions

Creates a stream from a Java iterator that may throw exceptions

def fromJavaIteratorEffect[R, A](iterator: ZIO[R, Throwable, Iterator[A]]): ZStream[R, Throwable, A]

Creates a stream from a Java iterator that may potentially throw exceptions

Creates a stream from a Java iterator that may potentially throw exceptions

Creates a stream from a managed iterator

Creates a stream from a managed iterator

def fromJavaIteratorTotal[A](iterator: => Iterator[A]): ZStream[Any, Nothing, A]

Creates a stream from a Java iterator

Creates a stream from a Java iterator

def fromQueue[R, E, O](queue: ZQueue[Nothing, R, Any, E, Nothing, O], maxChunkSize: Int): ZStream[R, E, O]

Creates a stream from a zio.ZQueue of values

Creates a stream from a zio.ZQueue of values

Value parameters:
maxChunkSize

Maximum number of queued elements to put in one chunk in the stream

def fromQueueWithShutdown[R, E, O](queue: ZQueue[Nothing, R, Any, E, Nothing, O], maxChunkSize: Int): ZStream[R, E, O]

Creates a stream from a zio.ZQueue of values. The queue will be shutdown once the stream is closed.

Creates a stream from a zio.ZQueue of values. The queue will be shutdown once the stream is closed.

Value parameters:
maxChunkSize

Maximum number of queued elements to put in one chunk in the stream

def fromSchedule[R, A](schedule: Schedule[R, Any, A]): ZStream[R & Clock, Nothing, A]

Creates a stream from a zio.Schedule that does not require any further input. The stream will emit an element for each value output from the schedule, continuing for as long as the schedule continues.

Creates a stream from a zio.Schedule that does not require any further input. The stream will emit an element for each value output from the schedule, continuing for as long as the schedule continues.

def fromTQueue[A](queue: TQueue[A]): ZStream[Any, Nothing, A]

Creates a stream from a zio.stm.TQueue of values.

Creates a stream from a zio.stm.TQueue of values.

def halt[E](cause: => Cause[E]): ZStream[Any, E, Nothing]

The stream that always halts with cause.

The stream that always halts with cause.

def iterate[A](a: A)(f: A => A): ZStream[Any, Nothing, A]

The infinite stream of iterative function application: a, f(a), f(f(a)), f(f(f(a))), ...

The infinite stream of iterative function application: a, f(a), f(f(a)), f(f(f(a))), ...

def managed[R, E, A](managed: ZManaged[R, E, A]): ZStream[R, E, A]

Creates a single-valued stream from a managed resource

Creates a single-valued stream from a managed resource

def mergeAll[R, E, O](n: Int, outputBuffer: Int)(streams: ZStream[R, E, O]*): ZStream[R, E, O]

Merges a variable list of streams in a non-deterministic fashion. Up to n streams may be consumed in parallel and up to outputBuffer chunks may be buffered by this operator.

Merges a variable list of streams in a non-deterministic fashion. Up to n streams may be consumed in parallel and up to outputBuffer chunks may be buffered by this operator.

def mergeAllUnbounded[R, E, O](outputBuffer: Int)(streams: ZStream[R, E, O]*): ZStream[R, E, O]

Like mergeAll, but runs all streams concurrently.

Like mergeAll, but runs all streams concurrently.

def paginate[R, E, A, S](s: S)(f: S => (A, Option[S])): ZStream[Any, Nothing, A]

Like unfoldM, but allows the emission of values to end one step further than the unfolding of the state. This is useful for embedding paginated APIs, hence the name.

Like unfoldM, but allows the emission of values to end one step further than the unfolding of the state. This is useful for embedding paginated APIs, hence the name.

def paginateChunk[A, S](s: S)(f: S => (Chunk[A], Option[S])): ZStream[Any, Nothing, A]

Like unfoldChunk, but allows the emission of values to end one step further than the unfolding of the state. This is useful for embedding paginated APIs, hence the name.

Like unfoldChunk, but allows the emission of values to end one step further than the unfolding of the state. This is useful for embedding paginated APIs, hence the name.

def paginateChunkM[R, E, A, S](s: S)(f: S => ZIO[R, E, (Chunk[A], Option[S])]): ZStream[R, E, A]

Like unfoldChunkM, but allows the emission of values to end one step further than the unfolding of the state. This is useful for embedding paginated APIs, hence the name.

Like unfoldChunkM, but allows the emission of values to end one step further than the unfolding of the state. This is useful for embedding paginated APIs, hence the name.

def paginateM[R, E, A, S](s: S)(f: S => ZIO[R, E, (A, Option[S])]): ZStream[R, E, A]

Like unfoldM, but allows the emission of values to end one step further than the unfolding of the state. This is useful for embedding paginated APIs, hence the name.

Like unfoldM, but allows the emission of values to end one step further than the unfolding of the state. This is useful for embedding paginated APIs, hence the name.

def range(min: Int, max: Int, chunkSize: Int): ZStream[Any, Nothing, Int]

Constructs a stream from a range of integers (lower bound included, upper bound not included)

Constructs a stream from a range of integers (lower bound included, upper bound not included)

def repeat[A](a: => A): ZStream[Any, Nothing, A]

Repeats the provided value infinitely.

Repeats the provided value infinitely.

def repeatEffect[R, E, A](fa: ZIO[R, E, A]): ZStream[R, E, A]

Creates a stream from an effect producing a value of type A which repeats forever.

Creates a stream from an effect producing a value of type A which repeats forever.

def repeatEffectChunk[R, E, A](fa: ZIO[R, E, Chunk[A]]): ZStream[R, E, A]

Creates a stream from an effect producing chunks of A values which repeats forever.

Creates a stream from an effect producing chunks of A values which repeats forever.

def repeatEffectChunkOption[R, E, A](fa: ZIO[R, Option[E], Chunk[A]]): ZStream[R, E, A]

Creates a stream from an effect producing chunks of A values until it fails with None.

Creates a stream from an effect producing chunks of A values until it fails with None.

def repeatEffectOption[R, E, A](fa: ZIO[R, Option[E], A]): ZStream[R, E, A]

Creates a stream from an effect producing values of type A until it fails with None.

Creates a stream from an effect producing values of type A until it fails with None.

def repeatEffectWith[R, E, A](effect: ZIO[R, E, A], schedule: Schedule[R, A, Any]): ZStream[R & Clock, E, A]

Creates a stream from an effect producing a value of type A, which is repeated using the specified schedule.

Creates a stream from an effect producing a value of type A, which is repeated using the specified schedule.

def repeatWith[R, A](a: => A, schedule: Schedule[R, A, _]): ZStream[R & Clock, Nothing, A]

Repeats the value using the provided schedule.

Repeats the value using the provided schedule.

def service[A : Tag]: ZStream[Has[A], Nothing, A]

Accesses the specified service in the environment of the stream.

Accesses the specified service in the environment of the stream.

Accesses the specified service in the environment of the stream in the context of an effect.

Accesses the specified service in the environment of the stream in the context of an effect.

Accesses the specified service in the environment of the stream in the context of a stream.

Accesses the specified service in the environment of the stream in the context of a stream.

def services[A : Tag, B : Tag]: ZStream[Has[A] & Has[B], Nothing, (A, B)]

Accesses the specified services in the environment of the stream.

Accesses the specified services in the environment of the stream.

def services[A : Tag, B : Tag, C : Tag]: ZStream[Has[A] & Has[B] & Has[C], Nothing, (A, B, C)]

Accesses the specified services in the environment of the stream.

Accesses the specified services in the environment of the stream.

def services[A : Tag, B : Tag, C : Tag, D : Tag]: ZStream[Has[A] & Has[B] & Has[C] & Has[D], Nothing, (A, B, C, D)]

Accesses the specified services in the environment of the stream.

Accesses the specified services in the environment of the stream.

def succeed[A](a: => A): ZStream[Any, Nothing, A]

Creates a single-valued pure stream

Creates a single-valued pure stream

def tick(interval: Duration): ZStream[Clock, Nothing, Unit]

A stream that emits Unit values spaced by the specified duration.

A stream that emits Unit values spaced by the specified duration.

def unfold[S, A](s: S)(f: S => Option[(A, S)]): ZStream[Any, Nothing, A]

Creates a stream by peeling off the "layers" of a value of type S

Creates a stream by peeling off the "layers" of a value of type S

def unfoldChunk[S, A](s: S)(f: S => Option[(Chunk[A], S)]): ZStream[Any, Nothing, A]

Creates a stream by peeling off the "layers" of a value of type S.

Creates a stream by peeling off the "layers" of a value of type S.

def unfoldChunkM[R, E, A, S](s: S)(f: S => ZIO[R, E, Option[(Chunk[A], S)]]): ZStream[R, E, A]

Creates a stream by effectfully peeling off the "layers" of a value of type S

Creates a stream by effectfully peeling off the "layers" of a value of type S

def unfoldM[R, E, A, S](s: S)(f: S => ZIO[R, E, Option[(A, S)]]): ZStream[R, E, A]

Creates a stream by effectfully peeling off the "layers" of a value of type S

Creates a stream by effectfully peeling off the "layers" of a value of type S

def unwrap[R, E, A](fa: ZIO[R, E, ZStream[R, E, A]]): ZStream[R, E, A]

Creates a stream produced from an effect

Creates a stream produced from an effect

def unwrapManaged[R, E, A](fa: ZManaged[R, E, ZStream[R, E, A]]): ZStream[R, E, A]

Creates a stream produced from a ZManaged

Creates a stream produced from a ZManaged

def when[R, E, O](b: => Boolean)(zStream: => ZStream[R, E, O]): ZStream[R, E, O]

Returns the specified stream if the given condition is satisfied, otherwise returns an empty stream.

Returns the specified stream if the given condition is satisfied, otherwise returns an empty stream.

def whenCase[R, E, A, O](a: => A)(pf: PartialFunction[A, ZStream[R, E, O]]): ZStream[R, E, O]

Returns the resulting stream when the given PartialFunction is defined for the given value, otherwise returns an empty stream.

Returns the resulting stream when the given PartialFunction is defined for the given value, otherwise returns an empty stream.

def whenCaseM[R, E, A](a: ZIO[R, E, A]): WhenCaseM[R, E, A]

Returns the resulting stream when the given PartialFunction is defined for the given effectful value, otherwise returns an empty stream.

Returns the resulting stream when the given PartialFunction is defined for the given effectful value, otherwise returns an empty stream.

def whenM[R, E](b: ZIO[R, E, Boolean]): WhenM[R, E]

Returns the specified stream if the given effectful condition is satisfied, otherwise returns an empty stream.

Returns the specified stream if the given effectful condition is satisfied, otherwise returns an empty stream.

def zipN[R, E, A, B, C](zStream1: ZStream[R, E, A], zStream2: ZStream[R, E, B])(f: (A, B) => C): ZStream[R, E, C]

Zips the specified streams together with the specified function.

Zips the specified streams together with the specified function.

def zipN[R, E, A, B, C, D](zStream1: ZStream[R, E, A], zStream2: ZStream[R, E, B], zStream3: ZStream[R, E, C])(f: (A, B, C) => D): ZStream[R, E, D]

Zips with specified streams together with the specified function.

Zips with specified streams together with the specified function.

def zipN[R, E, A, B, C, D, F](zStream1: ZStream[R, E, A], zStream2: ZStream[R, E, B], zStream3: ZStream[R, E, C], zStream4: ZStream[R, E, D])(f: (A, B, C, D) => F): ZStream[R, E, F]

Returns an effect that executes the specified effects in parallel, combining their results with the specified f function. If any effect fails, then the other effects will be interrupted.

Returns an effect that executes the specified effects in parallel, combining their results with the specified f function. If any effect fails, then the other effects will be interrupted.

Inherited methods

def effectAsync[R, E, A](register: ZIO[R, Option[E], Chunk[A]] => Future[Boolean] => Unit, outputBuffer: Int): ZStream[R, E, A]

Creates a stream from an asynchronous callback that can be called multiple times. The optionality of the error type E can be used to signal the end of the stream, by setting it to None.

Creates a stream from an asynchronous callback that can be called multiple times. The optionality of the error type E can be used to signal the end of the stream, by setting it to None.

Inherited from:
ZStreamPlatformSpecificConstructors
def effectAsyncInterrupt[R, E, A](register: Emit[R, E, A, Future[Boolean]] => Either[Canceler[R], ZStream[R, E, A]], outputBuffer: Int): ZStream[R, E, A]

Creates a stream from an asynchronous callback that can be called multiple times. The registration of the callback returns either a canceler or synchronously returns a stream. The optionality of the error type E can be used to signal the end of the stream, by setting it to None.

Creates a stream from an asynchronous callback that can be called multiple times. The registration of the callback returns either a canceler or synchronously returns a stream. The optionality of the error type E can be used to signal the end of the stream, by setting it to None.

Inherited from:
ZStreamPlatformSpecificConstructors
def effectAsyncM[R, E, A](register: Emit[R, E, A, Future[Boolean]] => ZIO[R, E, Any], outputBuffer: Int): ZStream[R, E, A]

Creates a stream from an asynchronous callback that can be called multiple times The registration of the callback itself returns an effect. The optionality of the error type E can be used to signal the end of the stream, by setting it to None.

Creates a stream from an asynchronous callback that can be called multiple times The registration of the callback itself returns an effect. The optionality of the error type E can be used to signal the end of the stream, by setting it to None.

Inherited from:
ZStreamPlatformSpecificConstructors
def effectAsyncManaged[R, E, A](register: ZIO[R, Option[E], Chunk[A]] => Future[Boolean] => ZManaged[R, E, Any], outputBuffer: Int): ZStream[R, E, A]

Creates a stream from an asynchronous callback that can be called multiple times. The registration of the callback itself returns an a managed resource. The optionality of the error type E can be used to signal the end of the stream, by setting it to None.

Creates a stream from an asynchronous callback that can be called multiple times. The registration of the callback itself returns an a managed resource. The optionality of the error type E can be used to signal the end of the stream, by setting it to None.

Inherited from:
ZStreamPlatformSpecificConstructors
def effectAsyncMaybe[R, E, A](register: Emit[R, E, A, Future[Boolean]] => Option[ZStream[R, E, A]], outputBuffer: Int): ZStream[R, E, A]

Creates a stream from an asynchronous callback that can be called multiple times. The registration of the callback can possibly return the stream synchronously. The optionality of the error type E can be used to signal the end of the stream, by setting it to None.

Creates a stream from an asynchronous callback that can be called multiple times. The registration of the callback can possibly return the stream synchronously. The optionality of the error type E can be used to signal the end of the stream, by setting it to None.

Inherited from:
ZStreamPlatformSpecificConstructors
def fromInputStream(is: => InputStream, chunkSize: Int): ZStream[Any, IOException, Byte]

Creates a stream from a java.io.InputStream

Creates a stream from a java.io.InputStream

Inherited from:
ZStreamPlatformSpecificConstructors

Creates a stream from a java.io.InputStream. Ensures that the input stream is closed after it is exhausted.

Creates a stream from a java.io.InputStream. Ensures that the input stream is closed after it is exhausted.

Inherited from:
ZStreamPlatformSpecificConstructors

Creates a stream from a managed java.io.InputStream value.

Creates a stream from a managed java.io.InputStream value.

Inherited from:
ZStreamPlatformSpecificConstructors

Concrete fields

final val DefaultChunkSize: 4096

The default chunk size used by the various combinators and constructors of ZStream.

The default chunk size used by the various combinators and constructors of ZStream.

val empty: ZStream[Any, Nothing, Nothing]

The empty stream

The empty stream

val never: ZStream[Any, Nothing, Nothing]

The stream that never produces any value or fails with any error.

The stream that never produces any value or fails with any error.

val unit: ZStream[Any, Nothing, Unit]

A stream that contains a single Unit value.

A stream that contains a single Unit value.

Implicits

Implicits

final implicit def RefineToOrDieOps[R, E <: Throwable, A](self: ZStream[R, E, A]): RefineToOrDieOps[R, E, A]
final implicit def SortedByKey[R, E, K, A](self: ZStream[R, E, (K, A)]): SortedByKey[R, E, K, A]

Provides extension methods for streams that are sorted by distinct keys.

Provides extension methods for streams that are sorted by distinct keys.

final implicit def SyntaxOps[R, E, O](self: ZStream[R, E, O]): SyntaxOps[R, E, O]