object ZStream extends ZStreamPlatformSpecificConstructors with Serializable
- Alphabetic
- By Inheritance
- ZStream
- Serializable
- ZStreamPlatformSpecificConstructors
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- final class AccessMPartiallyApplied[R] extends AnyVal
- final class AccessPartiallyApplied[R] extends AnyVal
- final class AccessStreamPartiallyApplied[R] extends AnyVal
- final class GroupBy[-R, +E, +K, +V] extends AnyRef
Representation of a grouped stream.
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] extends AnyVal
- type Pull[-R, +E, +A] = ZIO[R, Option[E], A]
Describes an effectful pull from a stream.
Describes an effectful pull from a stream. The optionality of the error channel denotes normal termination of the stream when
Noneand an error whenSome(e: E).
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def absolve[R, E, A](xs: ZStream[R, E, Either[E, A]]): ZStream[R, E, A]
Submerges the error case of an
Eitherinto theZStream. - def access[R]: AccessPartiallyApplied[R]
Accesses the environment of the stream.
- def accessM[R]: AccessMPartiallyApplied[R]
Accesses the environment of the stream in the context of an effect.
- def accessStream[R]: AccessStreamPartiallyApplied[R]
Accesses the environment of the stream in the context of a stream.
- def apply[R, E, A](pull: ZManaged[R, Nothing, Pull[R, E, A]]): ZStream[R, E, A]
Creates a stream from a scoped Pull.
- def apply[A](as: A*): Stream[Nothing, A]
Creates a pure stream from a variable list of values
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def bracket[R, E, A](acquire: ZIO[R, E, A])(release: (A) => ZIO[R, Nothing, Any]): ZStream[R, E, A]
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]) => ZIO[R, Nothing, Any]): ZStream[R, E, A]
Creates a stream from a single value that will get cleaned up after the stream is consumed
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- 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.
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[R,E,A,B,C,D,F]* 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.
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[R,E,A,B,C,D]* for the more common point-wise variant.
- 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.
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[R,E,A,B,C]* for the more common point-wise variant.
- def die(ex: => Throwable): Stream[Nothing, Nothing]
The stream that always dies with the
ex. - def dieMessage(msg: => String): Stream[Nothing, Nothing]
The stream that always dies with an exception described by
msg. - def effectAsync[R, E, A](register: ((ZIO[R, Option[E], A]) => Unit) => Unit, outputBuffer: Int = 16): ZStream[R, E, A]
Creates a stream from an asynchronous callback that can be called multiple times.
Creates a stream from an asynchronous callback that can be called multiple times. The optionality of the error type
Ecan be used to signal the end of the stream, by setting it toNone. - def effectAsyncInterrupt[R, E, A](register: ((ZIO[R, Option[E], A]) => Unit) => Either[Canceler[R], ZStream[R, E, A]], outputBuffer: Int = 16): ZStream[R, E, A]
Creates a stream from an asynchronous callback that can be called multiple times.
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
Ecan be used to signal the end of the stream, by setting it toNone. - def effectAsyncM[R, E, A](register: ((ZIO[R, Option[E], A]) => Unit) => ZIO[R, E, Any], outputBuffer: Int = 16): 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.
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
Ecan be used to signal the end of the stream, by setting it toNone. - def effectAsyncMaybe[R, E, A](register: ((ZIO[R, Option[E], A]) => Unit) => Option[ZStream[R, E, A]], outputBuffer: Int = 16): ZStream[R, E, A]
Creates a stream from an asynchronous callback that can be called multiple times.
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
Ecan be used to signal the end of the stream, by setting it toNone. - val empty: Stream[Nothing, Nothing]
The empty stream
- def environment[R]: ZStream[R, Nothing, R]
Accesses the whole environment of the stream.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def fail[E](error: => E): Stream[E, Nothing]
The stream that always fails with the
error - def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def finalizer[R](finalizer: ZIO[R, Nothing, Any]): ZStream[R, Nothing, Nothing]
Creates an empty stream that never fails and executes the finalizer when it ends.
- def flatten[R, E, A](fa: ZStream[R, E, ZStream[R, E, A]]): ZStream[R, E, A]
Flattens nested streams.
- def flattenPar[R, E, A](n: Int, outputBuffer: Int = 16)(fa: ZStream[R, E, ZStream[R, E, A]]): ZStream[R, E, A]
Flattens a stream of streams into a stream by executing a non-deterministic concurrent merge.
Flattens a stream of streams into a stream by executing a non-deterministic concurrent merge. Up to
nstreams may be consumed in parallel and up tooutputBufferelements may be buffered by this operator. - def flattenParUnbounded[R, E, A](outputBuffer: Int = 16)(fa: ZStream[R, E, ZStream[R, E, A]]): ZStream[R, E, A]
Like flattenPar, but executes all streams concurrently.
- def fromChunk[A](c: => Chunk[A]): Stream[Nothing, A]
Creates a stream from a zio.Chunk of values
- 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 - 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
Aor an empty Stream - def fromInputStream(is: => InputStream, chunkSize: Int = ZStreamChunk.DefaultChunkSize): StreamEffectChunk[Any, IOException, Byte]
Creates a stream from a java.io.InputStream
- def fromIterable[A](as: => Iterable[A]): Stream[Nothing, A]
Creates a stream from an iterable collection of values
- def fromIterableM[R, E, A](iterable: ZIO[R, E, Iterable[A]]): ZStream[R, E, A]
Creates a stream from an effect producing a value of type
Iterable[A] - def fromIterator[R, E, A](iterator: ZIO[R, E, Iterator[A]]): ZStream[R, E, A]
Creates a stream from an iterator
- def fromIteratorManaged[R, E, A](iterator: ZManaged[R, E, Iterator[A]]): ZStream[R, E, A]
Creates a stream from a managed iterator
- def fromJavaIterator[R, E, A](iterator: ZIO[R, E, Iterator[A]]): ZStream[R, E, A]
Creates a stream from a Java iterator
- def fromJavaIteratorManaged[R, E, A](iterator: ZManaged[R, E, Iterator[A]]): ZStream[R, E, A]
Creates a stream from a managed iterator
- def fromQueue[R, E, A](queue: ZQueue[Nothing, Any, R, E, Nothing, A]): ZStream[R, E, A]
Creates a stream from a zio.ZQueue of values
- def fromQueueWithShutdown[R, E, A](queue: ZQueue[Nothing, Any, R, E, Nothing, A]): ZStream[R, E, A]
Creates a stream from a zio.ZQueue of values.
Creates a stream from a zio.ZQueue of values. The queue will be shutdown once the stream is closed.
- def fromSchedule[R, A](schedule: Schedule[R, Any, A]): ZStream[R, Nothing, A]
Creates a stream from a zio.Schedule that does not require any further input.
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.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def halt[E](cause: => Cause[E]): ZStream[Any, E, Nothing]
The stream that always halts with
cause. - def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- 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))), ...
- def managed[R, E, A](managed: ZManaged[R, E, A]): ZStream[R, E, A]
Creates a single-valued stream from a managed resource
- def mergeAll[R, E, A](n: Int, outputBuffer: Int = 16)(streams: ZStream[R, E, A]*): ZStream[R, E, A]
Merges a variable list of streams in a non-deterministic fashion.
Merges a variable list of streams in a non-deterministic fashion. Up to
nstreams may be consumed in parallel and up tooutputBufferelements may be buffered by this operator. - def mergeAllUnbounded[R, E, A](outputBuffer: Int = 16)(streams: ZStream[R, E, A]*): ZStream[R, E, A]
Like mergeAll, but runs all streams concurrently.
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val never: Stream[Nothing, Nothing]
The stream that never produces any value or fails with any error.
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def paginate[A, S](s: S)(f: (S) => (A, Option[S])): Stream[Nothing, A]
Like unfold, but allows the emission of values to end one step further the unfolding of the state.
Like unfold, but allows the emission of values to end one step further 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.
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): Stream[Nothing, Int]
Constructs a stream from a range of integers (lower bound included, upper bound not included)
- 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
Awhich repeats forever - 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
Auntil it fails with None. - def repeatEffectWith[R, E, A](fa: ZIO[R, E, A], schedule: Schedule[R, Unit, _]): ZStream[R, E, A]
Creates a stream from an effect producing a value of type
Awhich repeats using the specified schedule - def succeed[A](a: => A): Stream[Nothing, A]
Creates a single-valued pure stream
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def unfold[S, A](s: S)(f0: (S) => Option[(A, S)]): Stream[Nothing, A]
Creates a stream by peeling off the "layers" of a value of type
S - def unfoldM[R, E, A, S](s: S)(f0: (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 - val unit: Stream[Nothing, Unit]
The stream of units
- def unwrap[R, E, A](fa: ZIO[R, E, ZStream[R, E, A]]): ZStream[R, E, A]
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
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- 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
ffunction.Returns an effect that executes the specified effects in parallel, combining their results with the specified
ffunction. If any effect fails, then the other effects will be interrupted. - 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.
- 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.
- object GroupBy
- object Pull